From df89596edb5587c5aea9579b00e1a0f3699c29e4 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 18 Jan 2021 17:07:32 +0000 Subject: [PATCH] apidb: Compact Train database migrations Nothing but placeholders to be removed here. Change-Id: I065e3a950e79b0754a2589232ef8a46bb4e83e7f Signed-off-by: Stephen Finucane --- .../migrate_repo/versions/063_placeholder.py | 22 ------------------- .../migrate_repo/versions/064_placeholder.py | 22 ------------------- .../migrate_repo/versions/065_placeholder.py | 22 ------------------- .../migrate_repo/versions/066_placeholder.py | 22 ------------------- .../migrate_repo/versions/067_placeholder.py | 22 ------------------- .../versions/{062_stein.py => 067_train.py} | 0 nova/db/sqlalchemy/migration.py | 2 +- .../functional/db/api/test_migrations.py | 4 +--- 8 files changed, 2 insertions(+), 114 deletions(-) delete mode 100644 nova/db/sqlalchemy/api_migrations/migrate_repo/versions/063_placeholder.py delete mode 100644 nova/db/sqlalchemy/api_migrations/migrate_repo/versions/064_placeholder.py delete mode 100644 nova/db/sqlalchemy/api_migrations/migrate_repo/versions/065_placeholder.py delete mode 100644 nova/db/sqlalchemy/api_migrations/migrate_repo/versions/066_placeholder.py delete mode 100644 nova/db/sqlalchemy/api_migrations/migrate_repo/versions/067_placeholder.py rename nova/db/sqlalchemy/api_migrations/migrate_repo/versions/{062_stein.py => 067_train.py} (100%) diff --git a/nova/db/sqlalchemy/api_migrations/migrate_repo/versions/063_placeholder.py b/nova/db/sqlalchemy/api_migrations/migrate_repo/versions/063_placeholder.py deleted file mode 100644 index 7a93224504..0000000000 --- a/nova/db/sqlalchemy/api_migrations/migrate_repo/versions/063_placeholder.py +++ /dev/null @@ -1,22 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# This is a placeholder for backports. -# Do not use this number for new work. New work starts after -# all the placeholders. -# -# See this for more information: -# http://lists.openstack.org/pipermail/openstack-dev/2013-March/006827.html - - -def upgrade(migrate_engine): - pass diff --git a/nova/db/sqlalchemy/api_migrations/migrate_repo/versions/064_placeholder.py b/nova/db/sqlalchemy/api_migrations/migrate_repo/versions/064_placeholder.py deleted file mode 100644 index 7a93224504..0000000000 --- a/nova/db/sqlalchemy/api_migrations/migrate_repo/versions/064_placeholder.py +++ /dev/null @@ -1,22 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# This is a placeholder for backports. -# Do not use this number for new work. New work starts after -# all the placeholders. -# -# See this for more information: -# http://lists.openstack.org/pipermail/openstack-dev/2013-March/006827.html - - -def upgrade(migrate_engine): - pass diff --git a/nova/db/sqlalchemy/api_migrations/migrate_repo/versions/065_placeholder.py b/nova/db/sqlalchemy/api_migrations/migrate_repo/versions/065_placeholder.py deleted file mode 100644 index 7a93224504..0000000000 --- a/nova/db/sqlalchemy/api_migrations/migrate_repo/versions/065_placeholder.py +++ /dev/null @@ -1,22 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# This is a placeholder for backports. -# Do not use this number for new work. New work starts after -# all the placeholders. -# -# See this for more information: -# http://lists.openstack.org/pipermail/openstack-dev/2013-March/006827.html - - -def upgrade(migrate_engine): - pass diff --git a/nova/db/sqlalchemy/api_migrations/migrate_repo/versions/066_placeholder.py b/nova/db/sqlalchemy/api_migrations/migrate_repo/versions/066_placeholder.py deleted file mode 100644 index 7a93224504..0000000000 --- a/nova/db/sqlalchemy/api_migrations/migrate_repo/versions/066_placeholder.py +++ /dev/null @@ -1,22 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# This is a placeholder for backports. -# Do not use this number for new work. New work starts after -# all the placeholders. -# -# See this for more information: -# http://lists.openstack.org/pipermail/openstack-dev/2013-March/006827.html - - -def upgrade(migrate_engine): - pass diff --git a/nova/db/sqlalchemy/api_migrations/migrate_repo/versions/067_placeholder.py b/nova/db/sqlalchemy/api_migrations/migrate_repo/versions/067_placeholder.py deleted file mode 100644 index 7a93224504..0000000000 --- a/nova/db/sqlalchemy/api_migrations/migrate_repo/versions/067_placeholder.py +++ /dev/null @@ -1,22 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# This is a placeholder for backports. -# Do not use this number for new work. New work starts after -# all the placeholders. -# -# See this for more information: -# http://lists.openstack.org/pipermail/openstack-dev/2013-March/006827.html - - -def upgrade(migrate_engine): - pass diff --git a/nova/db/sqlalchemy/api_migrations/migrate_repo/versions/062_stein.py b/nova/db/sqlalchemy/api_migrations/migrate_repo/versions/067_train.py similarity index 100% rename from nova/db/sqlalchemy/api_migrations/migrate_repo/versions/062_stein.py rename to nova/db/sqlalchemy/api_migrations/migrate_repo/versions/067_train.py diff --git a/nova/db/sqlalchemy/migration.py b/nova/db/sqlalchemy/migration.py index 50dd4438aa..138319870a 100644 --- a/nova/db/sqlalchemy/migration.py +++ b/nova/db/sqlalchemy/migration.py @@ -30,7 +30,7 @@ from nova.i18n import _ INIT_VERSION = {} INIT_VERSION['main'] = 401 -INIT_VERSION['api'] = 61 +INIT_VERSION['api'] = 66 _REPOSITORY = {} LOG = logging.getLogger(__name__) diff --git a/nova/tests/functional/db/api/test_migrations.py b/nova/tests/functional/db/api/test_migrations.py index 622adafd7a..f27a31e2bf 100644 --- a/nova/tests/functional/db/api/test_migrations.py +++ b/nova/tests/functional/db/api/test_migrations.py @@ -167,15 +167,13 @@ class NovaAPIMigrationsWalk(test_migrations.WalkVersionsMixin): return self.engine def _skippable_migrations(self): - stein_placeholders = list(range(63, 68)) train_placeholders = list(range(68, 73)) ussuri_placeholders = list(range(73, 78)) victoria_placeholders = list(range(78, 83)) special_cases = [ self.INIT_VERSION + 1, # initial change ] - return (stein_placeholders + - train_placeholders + + return (train_placeholders + ussuri_placeholders + victoria_placeholders + special_cases)