Skip to content

Commit 5132e21

Browse files
committed
add OIDC auth method to postgres enum
1 parent 62dbe77 commit 5132e21

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"""add OIDC auth method
2+
3+
Revision ID: 09aba125b57a
4+
Revises: ba1e4a6cfe99
5+
Create Date: 2023-12-28 05:08:32.397027
6+
7+
"""
8+
import sqlalchemy as sa
9+
10+
import mealie.db.migration_types
11+
from alembic import op
12+
13+
# revision identifiers, used by Alembic.
14+
revision = "09aba125b57a"
15+
down_revision = "ba1e4a6cfe99"
16+
branch_labels = None
17+
depends_on = None
18+
19+
20+
def is_postgres():
21+
return op.get_context().dialect.name == "postgresql"
22+
23+
24+
def upgrade():
25+
if is_postgres():
26+
op.execute("ALTER TYPE authmethod ADD VALUE 'OIDC'")
27+
28+
29+
def downgrade():
30+
pass

0 commit comments

Comments
 (0)