Remove downgrades from migrations

According to cross project spec
I622f89fe63327d44f9b229d3bd9e76e15acbaa7a downgrade
migrations should be removed.

Change-Id: Iee38d8ba5e414e67033db35db52724d3f9f84fd7
This commit is contained in:
Anton Arefiev 2016-02-23 12:10:46 +02:00
parent a12d1af680
commit a94486d809
6 changed files with 6 additions and 21 deletions

View File

@ -39,7 +39,7 @@ def add_command_parsers(subparsers):
parser = add_alembic_command(subparsers, name)
parser.set_defaults(func=do_alembic_command)
for name in ['downgrade', 'stamp', 'show', 'edit']:
for name in ['stamp', 'show', 'edit']:
parser = add_alembic_command(subparsers, name)
parser.set_defaults(func=with_revision)
parser.add_argument('--revision', nargs='?', required=True)

View File

@ -30,7 +30,3 @@ ${imports if imports else ""}
def upgrade():
${upgrades if upgrades else "pass"}
def downgrade():
${downgrades if downgrades else "pass"}

View File

@ -61,9 +61,3 @@ def upgrade():
mysql_ENGINE='InnoDB',
mysql_DEFAULT_CHARSET='UTF8'
)
def downgrade():
op.drop_table('nodes')
op.drop_table('attributes')
op.drop_table('options')

View File

@ -62,9 +62,3 @@ def upgrade():
mysql_ENGINE='InnoDB',
mysql_DEFAULT_CHARSET='UTF8'
)
def downgrade():
op.drop_table('rules')
op.drop_table('rule_conditions')
op.drop_table('rule_actions')

View File

@ -31,7 +31,3 @@ import sqlalchemy as sa
def upgrade():
op.add_column('rule_conditions', sa.Column('invert', sa.Boolean(),
nullable=True, default=False))
def downgrade():
op.drop_column('rule_conditions', 'invert')

View File

@ -0,0 +1,5 @@
---
features:
- Database migrations downgrade was removed. More info about
database migration/rollback could be found here
http://docs.openstack.org/openstack-ops/content/ops_upgrades-roll-back.html