30 lines
736 B
Python
30 lines
736 B
Python
|
"""Add sudo expiration for ApiKeys
|
||
|
|
||
|
Revision ID: d1fb679f7eec
|
||
|
Revises: 673a074e4215
|
||
|
Create Date: 2022-06-22 18:24:38.983498
|
||
|
|
||
|
"""
|
||
|
import sqlalchemy_utils
|
||
|
from alembic import op
|
||
|
import sqlalchemy as sa
|
||
|
|
||
|
|
||
|
# revision identifiers, used by Alembic.
|
||
|
revision = 'd1fb679f7eec'
|
||
|
down_revision = '673a074e4215'
|
||
|
branch_labels = None
|
||
|
depends_on = None
|
||
|
|
||
|
|
||
|
def upgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.add_column('api_key', sa.Column('sudo_mode_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=True))
|
||
|
# ### end Alembic commands ###
|
||
|
|
||
|
|
||
|
def downgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.drop_column('api_key', 'sudo_mode_at')
|
||
|
# ### end Alembic commands ###
|