From 3791c3142c0e24eede00bc9824fd2ef17aba630c Mon Sep 17 00:00:00 2001
From: Julian Rother <julianr@fsmpi.rwth-aachen.de>
Date: Tue, 13 Apr 2021 23:05:00 +0200
Subject: [PATCH] Added missing oauth2grant.code index

---
 ...e6_added_missing_oauth2grant_code_index.py | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 migrations/versions/2a6b1fb82ce6_added_missing_oauth2grant_code_index.py

diff --git a/migrations/versions/2a6b1fb82ce6_added_missing_oauth2grant_code_index.py b/migrations/versions/2a6b1fb82ce6_added_missing_oauth2grant_code_index.py
new file mode 100644
index 00000000..9d24b8aa
--- /dev/null
+++ b/migrations/versions/2a6b1fb82ce6_added_missing_oauth2grant_code_index.py
@@ -0,0 +1,23 @@
+"""added missing oauth2grant.code index
+
+Revision ID: 2a6b1fb82ce6
+Revises: cbca20cf64d9
+Create Date: 2021-04-13 23:03:46.280189
+
+"""
+from alembic import op
+import sqlalchemy as sa
+
+# revision identifiers, used by Alembic.
+revision = '2a6b1fb82ce6'
+down_revision = 'cbca20cf64d9'
+branch_labels = None
+depends_on = None
+
+def upgrade():
+	with op.batch_alter_table('oauth2grant', schema=None) as batch_op:
+		batch_op.create_index(batch_op.f('ix_oauth2grant_code'), ['code'], unique=False)
+
+def downgrade():
+	with op.batch_alter_table('oauth2grant', schema=None) as batch_op:
+		batch_op.drop_index(batch_op.f('ix_oauth2grant_code'))
-- 
GitLab