Script 13af46c70227_remove_build_ended_on_build_started_on__py
|
|
1 """Remove build.ended_on, build.started_on columns
2
3 Revision ID: 13af46c70227
4 Revises: 22c5f7a954ce
5 Create Date: 2016-03-04 09:14:03.088234
6
7 """
8
9
10 revision = '13af46c70227'
11 down_revision = '22c5f7a954ce'
12
13 from alembic import op
14 import sqlalchemy as sa
15
16
18 op.drop_column('build', 'ended_on')
19 op.drop_column('build', 'started_on')
20 op.create_index('build_canceled', 'build', ['canceled'], unique=False)
21
22
24 op.drop_index('build_canceled', table_name='build')
25 op.add_column('build', sa.Column('started_on', sa.INTEGER(), autoincrement=False, nullable=True))
26 op.add_column('build', sa.Column('ended_on', sa.INTEGER(), autoincrement=False, nullable=True))
27 op.create_index('build_ended_on_canceled_started_on', 'build', ['ended_on', 'canceled', 'started_on'], unique=False)
28