app-MAIL-temp/migrations/versions/2020_121319_a20aeb9b0eac_.py
2020-12-13 19:05:43 +01:00

40 lines
1.2 KiB
Python

"""empty message
Revision ID: a20aeb9b0eac
Revises: 780a8344914b
Create Date: 2020-12-13 19:04:46.771429
"""
import sqlalchemy_utils
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'a20aeb9b0eac'
down_revision = '780a8344914b'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('coinbase_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('code', sa.String(length=64), 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('coinbase_subscription')
# ### end Alembic commands ###