-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement e-kirjasto authentication flow for admins
- Loading branch information
Showing
12 changed files
with
399 additions
and
13 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
alembic/versions/20240222_9966f6f95674_create_admincredentials_table.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
"""Create admincredentials table | ||
Revision ID: 9966f6f95674 | ||
Revises: 993729d4bf97 | ||
Create Date: 2024-02-22 02:36:07.130941+00:00 | ||
""" | ||
import sqlalchemy as sa | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "9966f6f95674" | ||
down_revision = "993729d4bf97" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.create_table( | ||
"admincredentials", | ||
sa.Column("id", sa.Integer(), nullable=False), | ||
sa.Column("external_id", sa.Unicode(), nullable=False), | ||
sa.Column("admin_id", sa.Integer(), nullable=False), | ||
sa.ForeignKeyConstraint(["admin_id"], ["admins.id"], ondelete="CASCADE"), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
op.create_index( | ||
op.f("ix_admincredentials_admin_id"), | ||
"admincredentials", | ||
["admin_id"], | ||
unique=False, | ||
) | ||
|
||
|
||
def downgrade() -> None: | ||
op.drop_index(op.f("ix_admincredentials_admin_id"), table_name="admincredentials") | ||
op.drop_table("admincredentials") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.