38 lines
1.1 KiB
Python
38 lines
1.1 KiB
Python
"""auto
|
|
|
|
Revision ID: e0afd892f86e
|
|
Revises: 7dd0c2491053
|
|
Create Date: 2025-06-09 02:37:06.190352
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'e0afd892f86e'
|
|
down_revision = '7dd0c2491053'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('import_batches',
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
sa.Column('export_id', sa.String(length=64), nullable=False),
|
|
sa.Column('user_id', sa.Integer(), nullable=False),
|
|
sa.Column('imported_at', sa.DateTime(), nullable=False),
|
|
sa.PrimaryKeyConstraint('id'),
|
|
sa.UniqueConstraint('export_id', 'user_id', name='uix_export_user')
|
|
)
|
|
op.create_index(op.f('ix_import_batches_user_id'), 'import_batches', ['user_id'], unique=False)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_index(op.f('ix_import_batches_user_id'), table_name='import_batches')
|
|
op.drop_table('import_batches')
|
|
# ### end Alembic commands ###
|