mirror of
https://github.com/simple-login/app.git
synced 2024-11-10 17:35:27 +08:00
39 lines
1.2 KiB
Python
39 lines
1.2 KiB
Python
"""empty message
|
|
|
|
Revision ID: e3cb44b953f2
|
|
Revises: f580030d9beb
|
|
Create Date: 2020-02-23 16:43:45.843338
|
|
|
|
"""
|
|
import sqlalchemy_utils
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'e3cb44b953f2'
|
|
down_revision = 'f580030d9beb'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('manual_subscription',
|
|
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('user_id', sa.Integer(), nullable=False),
|
|
sa.Column('end_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=False),
|
|
sa.Column('comment', sa.Text(), nullable=True),
|
|
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='cascade'),
|
|
sa.PrimaryKeyConstraint('id'),
|
|
sa.UniqueConstraint('user_id')
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table('manual_subscription')
|
|
# ### end Alembic commands ###
|