123456789101112131415161718192021222324252627282930 |
- """add_code
- Revision ID: c1d7ddb101a1
- Revises: 3d9ba6086a23
- Create Date: 2019-04-01 17:23:32.312946
- """
- from alembic import op
- import sqlalchemy as sa
- # revision identifiers, used by Alembic.
- revision = 'c1d7ddb101a1'
- down_revision = '3d9ba6086a23'
- branch_labels = None
- depends_on = None
- def upgrade():
- op.create_table('code',
- sa.Column('id', sa.Integer(), nullable=False),
- sa.Column('expire_date', sa.DateTime(), nullable=True),
- sa.Column('secret', sa.String(length=255), nullable=True),
- sa.PrimaryKeyConstraint('id', name=op.f('pk_code')),
- sa.UniqueConstraint('secret', name=op.f('uq_code_secret'))
- )
- def downgrade():
- op.drop_table('code')
|