mirror of
https://github.com/simple-login/app.git
synced 2024-11-16 17:08:30 +01:00
39 lines
1.2 KiB
Python
39 lines
1.2 KiB
Python
|
"""Create sync_event table
|
||
|
|
||
|
Revision ID: 06a9a7133445
|
||
|
Revises: fa2f19bb4e5a
|
||
|
Create Date: 2024-05-17 13:11:20.402259
|
||
|
|
||
|
"""
|
||
|
import sqlalchemy_utils
|
||
|
from alembic import op
|
||
|
import sqlalchemy as sa
|
||
|
|
||
|
|
||
|
# revision identifiers, used by Alembic.
|
||
|
revision = '06a9a7133445'
|
||
|
down_revision = 'fa2f19bb4e5a'
|
||
|
branch_labels = None
|
||
|
depends_on = None
|
||
|
|
||
|
|
||
|
def upgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.create_table('sync_event',
|
||
|
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
|
||
|
sa.Column('created_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=False),
|
||
|
sa.Column('updated_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=True),
|
||
|
sa.Column('content', sa.LargeBinary(), nullable=False),
|
||
|
sa.Column('taken_time', sqlalchemy_utils.types.arrow.ArrowType(), nullable=True),
|
||
|
sa.PrimaryKeyConstraint('id')
|
||
|
)
|
||
|
op.create_index(op.f('ix_sync_event_created_at'), 'sync_event', ['created_at'], unique=False)
|
||
|
op.create_index(op.f('ix_sync_event_taken_time'), 'sync_event', ['taken_time'], unique=False)
|
||
|
# ### end Alembic commands ###
|
||
|
|
||
|
|
||
|
def downgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.drop_table('sync_event')
|
||
|
# ### end Alembic commands ###
|