Killed existing downgrade rules in migration scripts

Change-Id: I4957b23bf5bed52d67cf5b9346a416c4a0716723
Partial-Bug: #1434103
changes/60/326560/2
Sergey Belous 7 years ago
parent b44619e55a
commit b7e585e033

@ -41,18 +41,3 @@ def upgrade():
existing_type=sa.String(255))
op.alter_column(u'session_persistence_type', u'name',
existing_type=sa.String(255))
def downgrade():
op.alter_column(u'provisioning_status', u'name',
existing_type=sa.String(30))
op.alter_column(u'operating_status', u'name',
existing_type=sa.String(30))
op.alter_column(u'health_monitor_type', u'name',
existing_type=sa.String(30))
op.alter_column(u'protocol', u'name',
existing_type=sa.String(30))
op.alter_column(u'algorithm', u'name',
existing_type=sa.String(30))
op.alter_column(u'session_persistence_type', u'name',
existing_type=sa.String(30))

@ -36,15 +36,3 @@ def upgrade():
existing_type=sa.String(36))
batch_op.drop_column(u'floating_ip_id')
batch_op.drop_column(u'floating_ip_network_id')
def downgrade():
with op.batch_alter_table(u'vip') as batch_op:
batch_op.add_column(sa.Column(u'floating_ip_network_id',
sa.String(36), nullable=True))
batch_op.add_column(sa.Column(u'floating_ip_id', sa.String(36),
nullable=True))
batch_op.alter_column(u'port_id', new_column_name=u'net_port_id',
existing_type=sa.String(36))
batch_op.alter_column(u'network_id', new_column_name=u'subnet_id',
existing_type=sa.String(36))

@ -32,7 +32,3 @@ import sqlalchemy as sa
def upgrade():
op.add_column(u'load_balancer', sa.Column(u'server_group_id',
sa.String(36), nullable=True))
def downgrade():
pass

@ -31,7 +31,3 @@ import sqlalchemy as sa
def upgrade():
op.add_column(u'amphora', sa.Column(u'lb_network_ip', sa.String(64),
nullable=True))
def downgrade():
op.drop_column(u'amphora', u'lb_network_ip')

@ -33,8 +33,3 @@ def upgrade():
sa.Column(u'vrrp_port_id', sa.String(36), nullable=True))
op.add_column(u'amphora',
sa.Column(u'ha_port_id', sa.String(36), nullable=True))
def downgrade():
op.drop_column(u'amphora', u'vrrp_port_id')
op.drop_column(u'amphora', u'ha_port_id')

@ -350,23 +350,3 @@ def upgrade():
name=u'fk_load_balancer_amphora_id'),
sa.PrimaryKeyConstraint(u'amphora_id', u'load_balancer_id')
)
def downgrade():
op.drop_table(u'load_balancer_amphora')
op.drop_table(u'amphora')
op.drop_table(u'listener_statistics')
op.drop_table(u'sni')
op.drop_table(u'listener')
op.drop_table(u'vip')
op.drop_table(u'load_balancer')
op.drop_table(u'member')
op.drop_table(u'session_persistence')
op.drop_table(u'health_monitor')
op.drop_table(u'pool')
op.drop_table(u'provisioning_status')
op.drop_table(u'operating_status')
op.drop_table(u'session_persistence_type')
op.drop_table(u'algorithm')
op.drop_table(u'protocol')
op.drop_table(u'health_monitor_type')

@ -31,8 +31,3 @@ import sqlalchemy as sa
def upgrade():
op.alter_column(u'amphora', u'host_id', new_column_name='compute_id',
existing_type=sa.String(36), nullable=True)
def downgrade():
op.alter_column(u'amphora', u'compute_id', new_column_name='host_id',
existing_type=sa.String(36), nullable=False)

@ -33,8 +33,3 @@ def upgrade():
sa.Column(u'vrrp_ip', sa.String(64), nullable=True))
op.add_column(u'amphora',
sa.Column(u'ha_ip', sa.String(64), nullable=True))
def downgrade():
op.drop_column(u'amphora', u'vrrp_ip')
op.drop_column(u'amphora', u'ha_ip')

@ -45,7 +45,3 @@ def upgrade():
{'name': 'ALLOCATED'}
]
)
def downgrade():
pass

@ -45,32 +45,3 @@ def upgrade():
u'fk_amphora_provisioning_status_name', u'amphora',
u'provisioning_status', [u'status'], [u'name']
)
def downgrade():
op.drop_constraint(
u'fk_amphora_load_balancer_id', u'amphora', type_=u'foreignkey'
)
op.drop_column(
u'amphora', u'load_balancer_id'
)
op.create_table(
u'load_balancer_amphora',
sa.Column(u'amphora_id', sa.String(36), nullable=False),
sa.Column(u'load_balancer_id', sa.String(36), nullable=False),
sa.ForeignKeyConstraint(
[u'load_balancer_id'], [u'load_balancer.id'],
name=u'fk_load_balancer_amphora_load_balancer_id'),
sa.ForeignKeyConstraint([u'amphora_id'],
[u'amphora.id'],
name=u'fk_load_balancer_amphora_id'),
sa.PrimaryKeyConstraint(u'amphora_id', u'load_balancer_id')
)
op.drop_constraint(
u'fk_amphora_provisioning_status_name', u'amphora',
type_=u'foreignkey'
)
op.create_foreign_key(
u'fk_container_provisioning_status_name', u'amphora',
u'provisioning_status', [u'status'], [u'name']
)

@ -31,8 +31,3 @@ import sqlalchemy as sa
def upgrade():
op.alter_column(u'member', u'address', new_column_name=u'ip_address',
existing_type=sa.String(64))
def downgrade():
op.alter_column(u'member', u'ip_address', new_column_name=u'address',
existing_type=sa.String(64))

@ -31,9 +31,3 @@ def upgrade():
with op.batch_alter_table(u'vip') as batch_op:
batch_op.alter_column(u'network_id', new_column_name=u'subnet_id',
existing_type=sa.String(36))
def downgrade():
with op.batch_alter_table(u'vip') as batch_op:
batch_op.alter_column(u'subnet_id', new_column_name=u'network_id',
existing_type=sa.String(36))

@ -31,7 +31,3 @@ import sqlalchemy as sa
def upgrade():
op.alter_column(u'sni', u'tls_container_id', type_=sa.String(128),
existing_type=sa.String(36), nullable=True)
def downgrade():
pass

@ -28,8 +28,6 @@ down_revision = '8c0851bdf6c3'
def upgrade():
# OpenStack has decided that "down" migrations are not supported.
# The downgrade() method has been omitted for this reason.
op.add_column('listener_statistics',
sa.Column('amphora_id',
sa.String(36),

Loading…
Cancel
Save