ref: legacy
src/alembic/versions/6e334556e8f8_create_cycles.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
"""create cycles Revision ID: 6e334556e8f8 Revises: d6a05e473bc9 Create Date: 2019-12-04 02:11:55.635795 """ from alembic import op import sqlalchemy as sa import sqlalchemy_utils as sau # revision identifiers, used by Alembic. revision = '6e334556e8f8' down_revision = 'd6a05e473bc9' branch_labels = None depends_on = None def upgrade(): op.create_table('cycles', sa.Column('id', sa.Integer, primary_key = True), sa.Column('name', sa.String(255), nullable = False), sa.Column('description', sa.Text), sa.Column('start_at', sa.DateTime, nullable = False), sa.Column('end_at', sa.DateTime, nullable = False), sa.Column('delivery_start_at', sa.DateTime, nullable = False), sa.Column('delivery_end_at', sa.DateTime, nullable = False), sa.Column('status', sa.String(255), server_default = 'draft'), sa.Column('created_at', sa.DateTime), sa.Column('updated_at', sa.DateTime) ) def downgrade(): op.drop_table('cycles') |