-
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.
Merge pull request #34 from NatLibFi/feature/simplye-226/clean-inacti…
…ve-admins Create reaper monitor for deleting inactive admins
- Loading branch information
Showing
4 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
alembic/versions/20240404_be8ed331efcc_add_last_signed_in_column_to_.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,32 @@ | ||
"""Add last_signed_in column to admincredentials | ||
Revision ID: be8ed331efcc | ||
Revises: 4915a361b082 | ||
Create Date: 2024-04-04 11:34:33.755399+00:00 | ||
""" | ||
import sqlalchemy as sa | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "be8ed331efcc" | ||
down_revision = "4915a361b082" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.add_column( | ||
"admincredentials", | ||
sa.Column( | ||
"last_signed_in", | ||
sa.DateTime(), | ||
server_default=sa.text("now()"), | ||
nullable=False, | ||
), | ||
) | ||
|
||
|
||
def downgrade() -> None: | ||
op.drop_column("admincredentials", "last_signed_in") |
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