43 lines
1.3 KiB
Python
43 lines
1.3 KiB
Python
"""empty message
|
|
|
|
Revision ID: 1b5a9f7af28e
|
|
Revises: d8901960326e
|
|
Create Date: 2023-12-05 09:46:36.417973
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '1b5a9f7af28e'
|
|
down_revision = 'd8901960326e'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('feature_flag',
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
sa.Column('generation_id', sa.Integer(), nullable=False),
|
|
sa.Column('value', sa.JSON(), nullable=False),
|
|
sa.Column('updated_at_in_seconds', sa.Integer(), nullable=False),
|
|
sa.Column('created_at_in_seconds', sa.Integer(), nullable=False),
|
|
sa.ForeignKeyConstraint(['generation_id'], ['cache_generation.id'], ),
|
|
sa.PrimaryKeyConstraint('id')
|
|
)
|
|
with op.batch_alter_table('feature_flag', schema=None) as batch_op:
|
|
batch_op.create_index(batch_op.f('ix_feature_flag_generation_id'), ['generation_id'], unique=True)
|
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('feature_flag', schema=None) as batch_op:
|
|
batch_op.drop_index(batch_op.f('ix_feature_flag_generation_id'))
|
|
|
|
op.drop_table('feature_flag')
|
|
# ### end Alembic commands ###
|