コード例 #1
0
def upgrade():
    ReleaseState.db_type().create(bind=op.get_bind())
    op.add_column(
        'releases',
        sa.Column('state',
                  ReleaseState.db_type(),
                  nullable=False,
                  server_default='disabled'))
    op.drop_column('releases', 'locked')
コード例 #2
0
def downgrade():
    op.drop_column('releases', 'state')
    op.add_column('releases', sa.Column('locked', sa.BOOLEAN(), default=False))
    ReleaseState.db_type().drop(bind=op.get_bind())
コード例 #3
0
def upgrade():
    ReleaseState.db_type().create(bind=op.get_bind())
    op.add_column('releases', sa.Column('state', ReleaseState.db_type(), nullable=False, server_default='disabled'))
    op.drop_column('releases', 'locked')
コード例 #4
0
def downgrade():
    op.drop_column('releases', 'state')
    op.add_column('releases', sa.Column('locked', sa.BOOLEAN(), default=False))
    ReleaseState.db_type().drop(bind=op.get_bind())