summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2023-04-07 04:27:50 +0000
committerGerrit Code Review <review@openstack.org>2023-04-07 04:27:50 +0000
commit27a312d78ec3853184e56d2624603c4713eaabef (patch)
tree61783f100179861adecc7932bdf20cc51f0a3bdb
parent458a969fddd517fa6775877428153c7d806b387c (diff)
parent998d8df4202e0edb2c791331232fadd7173559ee (diff)
downloadheat-27a312d78ec3853184e56d2624603c4713eaabef.tar.gz
Merge "db: Remove legacy migrations"
-rw-r--r--doc/source/conf.py1
-rw-r--r--heat/db/sqlalchemy/migrate_repo/README4
-rw-r--r--heat/db/sqlalchemy/migrate_repo/__init__.py0
-rwxr-xr-xheat/db/sqlalchemy/migrate_repo/manage.py18
-rw-r--r--heat/db/sqlalchemy/migrate_repo/migrate.cfg25
-rw-r--r--heat/db/sqlalchemy/migrate_repo/versions/073_newton.py387
-rw-r--r--heat/db/sqlalchemy/migrate_repo/versions/074_placeholder.py20
-rw-r--r--heat/db/sqlalchemy/migrate_repo/versions/075_placeholder.py20
-rw-r--r--heat/db/sqlalchemy/migrate_repo/versions/076_placeholder.py20
-rw-r--r--heat/db/sqlalchemy/migrate_repo/versions/077_placeholder.py20
-rw-r--r--heat/db/sqlalchemy/migrate_repo/versions/078_placeholder.py20
-rw-r--r--heat/db/sqlalchemy/migrate_repo/versions/079_resource_properties_data.py55
-rw-r--r--heat/db/sqlalchemy/migrate_repo/versions/080_resource_attrs_data.py31
-rw-r--r--heat/db/sqlalchemy/migrate_repo/versions/081_placeholder.py20
-rw-r--r--heat/db/sqlalchemy/migrate_repo/versions/082_placeholder.py20
-rw-r--r--heat/db/sqlalchemy/migrate_repo/versions/083_placeholder.py20
-rw-r--r--heat/db/sqlalchemy/migrate_repo/versions/084_placeholder.py20
-rw-r--r--heat/db/sqlalchemy/migrate_repo/versions/085_placeholder.py20
-rw-r--r--heat/db/sqlalchemy/migrate_repo/versions/086_drop_watch_rule_watch_data_tables.py53
-rw-r--r--heat/db/sqlalchemy/migrate_repo/versions/__init__.py0
-rw-r--r--requirements.txt1
21 files changed, 0 insertions, 775 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 0cf74e0e1..2bbceb0a8 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -179,7 +179,6 @@ apidoc_excluded_paths = [
'cmd',
'cloudinit',
'db/sqlalchemy/migrations/versions',
- 'db/sqlalchemy/migrate_repo/versions',
'engine/resources/aws',
'engine/resources/openstack',
'hacking',
diff --git a/heat/db/sqlalchemy/migrate_repo/README b/heat/db/sqlalchemy/migrate_repo/README
deleted file mode 100644
index 131117104..000000000
--- a/heat/db/sqlalchemy/migrate_repo/README
+++ /dev/null
@@ -1,4 +0,0 @@
-This is a database migration repository.
-
-More information at
-https://opendev.org/openstack/sqlalchemy-migrate
diff --git a/heat/db/sqlalchemy/migrate_repo/__init__.py b/heat/db/sqlalchemy/migrate_repo/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/heat/db/sqlalchemy/migrate_repo/__init__.py
+++ /dev/null
diff --git a/heat/db/sqlalchemy/migrate_repo/manage.py b/heat/db/sqlalchemy/migrate_repo/manage.py
deleted file mode 100755
index 41cba1adb..000000000
--- a/heat/db/sqlalchemy/migrate_repo/manage.py
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env python
-
-# 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.
-
-from migrate.versioning.shell import main
-
-if __name__ == '__main__':
- main(debug='False')
diff --git a/heat/db/sqlalchemy/migrate_repo/migrate.cfg b/heat/db/sqlalchemy/migrate_repo/migrate.cfg
deleted file mode 100644
index 3a6ff0abd..000000000
--- a/heat/db/sqlalchemy/migrate_repo/migrate.cfg
+++ /dev/null
@@ -1,25 +0,0 @@
-[db_settings]
-# Used to identify which repository this database is versioned under.
-# You can use the name of your project.
-repository_id=heat
-
-# The name of the database table used to track the schema version.
-# This name shouldn't already be used by your project.
-# If this is changed once a database is under version control, you'll need to
-# change the table name in each database too.
-version_table=migrate_version
-
-# When committing a change script, Migrate will attempt to generate the
-# sql for all supported databases; normally, if one of them fails - probably
-# because you don't have that database installed - it is ignored and the
-# commit continues, perhaps ending successfully.
-# Databases in this list MUST compile successfully during a commit, or the
-# entire commit will fail. List the databases your application will actually
-# be using to ensure your updates to that database work properly.
-# This must be a list; example: ['postgres','sqlite']
-required_dbs=[]
-
-# When creating new change scripts, Migrate will stamp the new script with
-# a version number. By default this is latest_version + 1. You can set this
-# to 'true' to tell Migrate to use the UTC timestamp instead.
-use_timestamp_numbering=False
diff --git a/heat/db/sqlalchemy/migrate_repo/versions/073_newton.py b/heat/db/sqlalchemy/migrate_repo/versions/073_newton.py
deleted file mode 100644
index 3293b91ce..000000000
--- a/heat/db/sqlalchemy/migrate_repo/versions/073_newton.py
+++ /dev/null
@@ -1,387 +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.
-
-import uuid
-
-import sqlalchemy
-
-from heat.db.sqlalchemy import types
-
-
-def upgrade(migrate_engine):
- meta = sqlalchemy.MetaData()
- meta.bind = migrate_engine
-
- raw_template_files = sqlalchemy.Table(
- 'raw_template_files', meta,
- sqlalchemy.Column('id', sqlalchemy.Integer,
- primary_key=True,
- nullable=False),
- sqlalchemy.Column('files', types.Json),
- sqlalchemy.Column('created_at', sqlalchemy.DateTime),
- sqlalchemy.Column('updated_at', sqlalchemy.DateTime),
- mysql_engine='InnoDB',
- mysql_charset='utf8'
- )
-
- raw_template = sqlalchemy.Table(
- 'raw_template', meta,
- sqlalchemy.Column('id', sqlalchemy.Integer, primary_key=True,
- nullable=False),
- sqlalchemy.Column('created_at', sqlalchemy.DateTime),
- sqlalchemy.Column('updated_at', sqlalchemy.DateTime),
- sqlalchemy.Column('template', types.LongText),
- sqlalchemy.Column('files', types.Json),
- sqlalchemy.Column('environment', types.Json),
- sqlalchemy.Column('files_id', sqlalchemy.Integer(),
- sqlalchemy.ForeignKey(
- 'raw_template_files.id',
- name='raw_tmpl_files_fkey_ref')),
- mysql_engine='InnoDB',
- mysql_charset='utf8'
- )
-
- user_creds = sqlalchemy.Table(
- 'user_creds', meta,
- sqlalchemy.Column('id', sqlalchemy.Integer,
- primary_key=True, nullable=False),
- sqlalchemy.Column('created_at', sqlalchemy.DateTime),
- sqlalchemy.Column('updated_at', sqlalchemy.DateTime),
- sqlalchemy.Column('username', sqlalchemy.String(255)),
- sqlalchemy.Column('password', sqlalchemy.String(255)),
- sqlalchemy.Column('region_name', sqlalchemy.String(length=255)),
- sqlalchemy.Column('decrypt_method', sqlalchemy.String(length=64)),
- sqlalchemy.Column('tenant', sqlalchemy.String(1024)),
- sqlalchemy.Column('auth_url', sqlalchemy.Text),
- sqlalchemy.Column('tenant_id', sqlalchemy.String(256)),
- sqlalchemy.Column('trust_id', sqlalchemy.String(255)),
- sqlalchemy.Column('trustor_user_id', sqlalchemy.String(64)),
- mysql_engine='InnoDB',
- mysql_charset='utf8'
- )
-
- stack = sqlalchemy.Table(
- 'stack', meta,
- sqlalchemy.Column('id', sqlalchemy.String(36),
- primary_key=True, nullable=False),
- sqlalchemy.Column('created_at', sqlalchemy.DateTime),
- sqlalchemy.Column('updated_at', sqlalchemy.DateTime),
- sqlalchemy.Column('deleted_at', sqlalchemy.DateTime),
- sqlalchemy.Column('name', sqlalchemy.String(255)),
- sqlalchemy.Column('raw_template_id',
- sqlalchemy.Integer,
- sqlalchemy.ForeignKey('raw_template.id'),
- nullable=False),
- sqlalchemy.Column('prev_raw_template_id',
- sqlalchemy.Integer,
- sqlalchemy.ForeignKey('raw_template.id')),
- sqlalchemy.Column('user_creds_id', sqlalchemy.Integer,
- sqlalchemy.ForeignKey('user_creds.id')),
- sqlalchemy.Column('username', sqlalchemy.String(256)),
- sqlalchemy.Column('owner_id', sqlalchemy.String(36)),
- sqlalchemy.Column('action', sqlalchemy.String(255)),
- sqlalchemy.Column('status', sqlalchemy.String(255)),
- sqlalchemy.Column('status_reason', sqlalchemy.Text),
- sqlalchemy.Column('timeout', sqlalchemy.Integer),
- sqlalchemy.Column('tenant', sqlalchemy.String(256)),
- sqlalchemy.Column('disable_rollback', sqlalchemy.Boolean,
- nullable=False),
- sqlalchemy.Column('stack_user_project_id',
- sqlalchemy.String(length=64)),
- sqlalchemy.Column('backup', sqlalchemy.Boolean, default=False),
- sqlalchemy.Column('nested_depth', sqlalchemy.Integer, default=0),
- sqlalchemy.Column('convergence', sqlalchemy.Boolean, default=False),
- sqlalchemy.Column('current_traversal', sqlalchemy.String(36)),
- sqlalchemy.Column('current_deps', types.Json),
- sqlalchemy.Column('parent_resource_name', sqlalchemy.String(255)),
- sqlalchemy.Index('ix_stack_name', 'name', mysql_length=255),
- sqlalchemy.Index('ix_stack_tenant', 'tenant', mysql_length=255),
- sqlalchemy.Index('ix_stack_owner_id', 'owner_id', mysql_length=36),
-
- mysql_engine='InnoDB',
- mysql_charset='utf8'
- )
-
- resource = sqlalchemy.Table(
- 'resource', meta,
- sqlalchemy.Column('id', sqlalchemy.Integer, primary_key=True,
- nullable=False),
- sqlalchemy.Column('uuid', sqlalchemy.String(36), unique=True,
- default=lambda: str(uuid.uuid4())),
- sqlalchemy.Column('nova_instance', sqlalchemy.String(255)),
- sqlalchemy.Column('name', sqlalchemy.String(255)),
- sqlalchemy.Column('created_at', sqlalchemy.DateTime),
- sqlalchemy.Column('updated_at', sqlalchemy.DateTime),
- sqlalchemy.Column('action', sqlalchemy.String(255)),
- sqlalchemy.Column('status', sqlalchemy.String(255)),
- sqlalchemy.Column('status_reason', sqlalchemy.Text),
- sqlalchemy.Column('stack_id', sqlalchemy.String(36),
- sqlalchemy.ForeignKey('stack.id'), nullable=False),
- sqlalchemy.Column('rsrc_metadata', types.LongText),
- sqlalchemy.Column('properties_data', types.Json),
- sqlalchemy.Column('engine_id', sqlalchemy.String(length=36)),
- sqlalchemy.Column('atomic_key', sqlalchemy.Integer),
- sqlalchemy.Column('needed_by', types.List),
- sqlalchemy.Column('requires', types.List),
- sqlalchemy.Column('replaces', sqlalchemy.Integer),
- sqlalchemy.Column('replaced_by', sqlalchemy.Integer),
- sqlalchemy.Column('current_template_id', sqlalchemy.Integer,
- sqlalchemy.ForeignKey('raw_template.id')),
- sqlalchemy.Column('properties_data_encrypted',
- sqlalchemy.Boolean,
- default=False),
- sqlalchemy.Column('root_stack_id', sqlalchemy.String(36)),
- sqlalchemy.Index('ix_resource_root_stack_id',
- 'root_stack_id',
- mysql_length=36),
- mysql_engine='InnoDB',
- mysql_charset='utf8'
- )
-
- resource_data = sqlalchemy.Table(
- 'resource_data', meta,
- sqlalchemy.Column('id', sqlalchemy.Integer, primary_key=True,
- nullable=False),
- sqlalchemy.Column('created_at', sqlalchemy.DateTime),
- sqlalchemy.Column('updated_at', sqlalchemy.DateTime),
- sqlalchemy.Column('key', sqlalchemy.String(255)),
- sqlalchemy.Column('value', sqlalchemy.Text),
- sqlalchemy.Column('redact', sqlalchemy.Boolean),
- sqlalchemy.Column('decrypt_method', sqlalchemy.String(length=64)),
- sqlalchemy.Column('resource_id',
- sqlalchemy.Integer,
- sqlalchemy.ForeignKey('resource.id',
- name='fk_resource_id',
- ondelete='CASCADE'),
- nullable=False),
- mysql_engine='InnoDB',
- mysql_charset='utf8'
- )
-
- event = sqlalchemy.Table(
- 'event', meta,
- sqlalchemy.Column('id', sqlalchemy.Integer, primary_key=True,
- nullable=False),
- sqlalchemy.Column('uuid', sqlalchemy.String(36),
- default=lambda: str(uuid.uuid4()), unique=True),
- sqlalchemy.Column('stack_id', sqlalchemy.String(36),
- sqlalchemy.ForeignKey('stack.id'), nullable=False),
- sqlalchemy.Column('created_at', sqlalchemy.DateTime),
- sqlalchemy.Column('updated_at', sqlalchemy.DateTime),
- sqlalchemy.Column('resource_action', sqlalchemy.String(255)),
- sqlalchemy.Column('resource_status', sqlalchemy.String(255)),
- sqlalchemy.Column('resource_name', sqlalchemy.String(255)),
- sqlalchemy.Column('physical_resource_id', sqlalchemy.String(255)),
- sqlalchemy.Column('resource_status_reason', sqlalchemy.String(255)),
- sqlalchemy.Column('resource_type', sqlalchemy.String(255)),
- sqlalchemy.Column('resource_properties', sqlalchemy.PickleType),
- mysql_engine='InnoDB',
- mysql_charset='utf8'
- )
-
- watch_rule = sqlalchemy.Table(
- 'watch_rule', meta,
- sqlalchemy.Column('id', sqlalchemy.Integer, primary_key=True,
- nullable=False),
- sqlalchemy.Column('created_at', sqlalchemy.DateTime),
- sqlalchemy.Column('updated_at', sqlalchemy.DateTime),
- sqlalchemy.Column('name', sqlalchemy.String(255)),
- sqlalchemy.Column('state', sqlalchemy.String(255)),
- sqlalchemy.Column('rule', types.LongText),
- sqlalchemy.Column('last_evaluated', sqlalchemy.DateTime),
- sqlalchemy.Column('stack_id', sqlalchemy.String(36),
- sqlalchemy.ForeignKey('stack.id'), nullable=False),
- mysql_engine='InnoDB',
- mysql_charset='utf8'
- )
-
- watch_data = sqlalchemy.Table(
- 'watch_data', meta,
- sqlalchemy.Column('id', sqlalchemy.Integer, primary_key=True,
- nullable=False),
- sqlalchemy.Column('created_at', sqlalchemy.DateTime),
- sqlalchemy.Column('updated_at', sqlalchemy.DateTime),
- sqlalchemy.Column('data', types.LongText),
- sqlalchemy.Column('watch_rule_id', sqlalchemy.Integer,
- sqlalchemy.ForeignKey('watch_rule.id'),
- nullable=False),
- mysql_engine='InnoDB',
- mysql_charset='utf8'
- )
-
- stack_lock = sqlalchemy.Table(
- 'stack_lock', meta,
- sqlalchemy.Column('stack_id', sqlalchemy.String(length=36),
- sqlalchemy.ForeignKey('stack.id'),
- primary_key=True,
- nullable=False),
- sqlalchemy.Column('created_at', sqlalchemy.DateTime),
- sqlalchemy.Column('updated_at', sqlalchemy.DateTime),
- sqlalchemy.Column('engine_id', sqlalchemy.String(length=36)),
- mysql_engine='InnoDB',
- mysql_charset='utf8'
- )
-
- software_config = sqlalchemy.Table(
- 'software_config', meta,
- sqlalchemy.Column('id', sqlalchemy.String(36),
- primary_key=True,
- nullable=False),
- sqlalchemy.Column('created_at', sqlalchemy.DateTime),
- sqlalchemy.Column('updated_at', sqlalchemy.DateTime),
- sqlalchemy.Column('name', sqlalchemy.String(255)),
- sqlalchemy.Column('group', sqlalchemy.String(255)),
- sqlalchemy.Column('config', types.LongText),
- sqlalchemy.Column('tenant', sqlalchemy.String(64),
- nullable=False,
- index=True),
- mysql_engine='InnoDB',
- mysql_charset='utf8'
- )
-
- software_deployment = sqlalchemy.Table(
- 'software_deployment', meta,
- sqlalchemy.Column('id', sqlalchemy.String(36),
- primary_key=True,
- nullable=False),
- sqlalchemy.Column('created_at', sqlalchemy.DateTime,
- index=True),
- sqlalchemy.Column('updated_at', sqlalchemy.DateTime),
- sqlalchemy.Column('server_id', sqlalchemy.String(36),
- nullable=False,
- index=True),
- sqlalchemy.Column('config_id',
- sqlalchemy.String(36),
- sqlalchemy.ForeignKey('software_config.id'),
- nullable=False),
- sqlalchemy.Column('input_values', types.Json),
- sqlalchemy.Column('output_values', types.Json),
- sqlalchemy.Column('action', sqlalchemy.String(255)),
- sqlalchemy.Column('status', sqlalchemy.String(255)),
- sqlalchemy.Column('status_reason', sqlalchemy.Text),
- sqlalchemy.Column('tenant', sqlalchemy.String(64),
- nullable=False,
- index=True),
- sqlalchemy.Column('stack_user_project_id',
- sqlalchemy.String(length=64)),
- mysql_engine='InnoDB',
- mysql_charset='utf8'
- )
-
- snapshot = sqlalchemy.Table(
- 'snapshot', meta,
- sqlalchemy.Column('id', sqlalchemy.String(36),
- primary_key=True,
- nullable=False),
- sqlalchemy.Column('stack_id',
- sqlalchemy.String(36),
- sqlalchemy.ForeignKey('stack.id'),
- nullable=False),
- sqlalchemy.Column('name', sqlalchemy.String(255)),
- sqlalchemy.Column('created_at', sqlalchemy.DateTime),
- sqlalchemy.Column('updated_at', sqlalchemy.DateTime),
- sqlalchemy.Column('status', sqlalchemy.String(255)),
- sqlalchemy.Column('status_reason', sqlalchemy.String(255)),
- sqlalchemy.Column('data', types.Json),
- sqlalchemy.Column('tenant', sqlalchemy.String(64),
- nullable=False,
- index=True),
- mysql_engine='InnoDB',
- mysql_charset='utf8'
- )
-
- service = sqlalchemy.Table(
- 'service', meta,
- sqlalchemy.Column('id', sqlalchemy.String(36), primary_key=True,
- default=lambda: str(uuid.uuid4())),
- sqlalchemy.Column('engine_id', sqlalchemy.String(36), nullable=False),
- sqlalchemy.Column('host', sqlalchemy.String(255), nullable=False),
- sqlalchemy.Column('hostname', sqlalchemy.String(255), nullable=False),
- sqlalchemy.Column('binary', sqlalchemy.String(255), nullable=False),
- sqlalchemy.Column('topic', sqlalchemy.String(255), nullable=False),
- sqlalchemy.Column('report_interval', sqlalchemy.Integer,
- nullable=False),
- sqlalchemy.Column('created_at', sqlalchemy.DateTime),
- sqlalchemy.Column('updated_at', sqlalchemy.DateTime),
- sqlalchemy.Column('deleted_at', sqlalchemy.DateTime),
- mysql_engine='InnoDB',
- mysql_charset='utf8'
- )
-
- stack_tag = sqlalchemy.Table(
- 'stack_tag', meta,
- sqlalchemy.Column('id',
- sqlalchemy.Integer,
- primary_key=True,
- nullable=False),
- sqlalchemy.Column('created_at', sqlalchemy.DateTime),
- sqlalchemy.Column('updated_at', sqlalchemy.DateTime),
- sqlalchemy.Column('tag', sqlalchemy.Unicode(80)),
- sqlalchemy.Column('stack_id',
- sqlalchemy.String(36),
- sqlalchemy.ForeignKey('stack.id'),
- nullable=False),
- mysql_engine='InnoDB',
- mysql_charset='utf8'
- )
-
- sync_point = sqlalchemy.Table(
- 'sync_point', meta,
- sqlalchemy.Column('entity_id', sqlalchemy.String(36)),
- sqlalchemy.Column('traversal_id', sqlalchemy.String(36)),
- sqlalchemy.Column('is_update', sqlalchemy.Boolean),
- sqlalchemy.Column('atomic_key', sqlalchemy.Integer,
- nullable=False),
- sqlalchemy.Column('stack_id', sqlalchemy.String(36),
- nullable=False),
- sqlalchemy.Column('input_data', types.Json),
- sqlalchemy.Column('created_at', sqlalchemy.DateTime),
- sqlalchemy.Column('updated_at', sqlalchemy.DateTime),
-
- sqlalchemy.PrimaryKeyConstraint('entity_id',
- 'traversal_id',
- 'is_update'),
- sqlalchemy.ForeignKeyConstraint(['stack_id'], ['stack.id'],
- name='fk_stack_id'),
-
- mysql_engine='InnoDB',
- mysql_charset='utf8'
- )
-
- tables = (
- raw_template_files,
- raw_template,
- user_creds,
- stack,
- resource,
- resource_data,
- event,
- watch_rule,
- watch_data,
- stack_lock,
- software_config,
- software_deployment,
- snapshot,
- service,
- stack_tag,
- sync_point,
- )
-
- for index, table in enumerate(tables):
- try:
- table.create()
- except Exception:
- # If an error occurs, drop all tables created so far to return
- # to the previously existing state.
- meta.drop_all(tables=tables[:index])
- raise
diff --git a/heat/db/sqlalchemy/migrate_repo/versions/074_placeholder.py b/heat/db/sqlalchemy/migrate_repo/versions/074_placeholder.py
deleted file mode 100644
index e46d47580..000000000
--- a/heat/db/sqlalchemy/migrate_repo/versions/074_placeholder.py
+++ /dev/null
@@ -1,20 +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 Newton backports.
-# Do not use this number for new Ocata work, which starts after
-# all the placeholders.
-
-
-def upgrade(migrate_engine):
- pass
diff --git a/heat/db/sqlalchemy/migrate_repo/versions/075_placeholder.py b/heat/db/sqlalchemy/migrate_repo/versions/075_placeholder.py
deleted file mode 100644
index e46d47580..000000000
--- a/heat/db/sqlalchemy/migrate_repo/versions/075_placeholder.py
+++ /dev/null
@@ -1,20 +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 Newton backports.
-# Do not use this number for new Ocata work, which starts after
-# all the placeholders.
-
-
-def upgrade(migrate_engine):
- pass
diff --git a/heat/db/sqlalchemy/migrate_repo/versions/076_placeholder.py b/heat/db/sqlalchemy/migrate_repo/versions/076_placeholder.py
deleted file mode 100644
index e46d47580..000000000
--- a/heat/db/sqlalchemy/migrate_repo/versions/076_placeholder.py
+++ /dev/null
@@ -1,20 +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 Newton backports.
-# Do not use this number for new Ocata work, which starts after
-# all the placeholders.
-
-
-def upgrade(migrate_engine):
- pass
diff --git a/heat/db/sqlalchemy/migrate_repo/versions/077_placeholder.py b/heat/db/sqlalchemy/migrate_repo/versions/077_placeholder.py
deleted file mode 100644
index e46d47580..000000000
--- a/heat/db/sqlalchemy/migrate_repo/versions/077_placeholder.py
+++ /dev/null
@@ -1,20 +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 Newton backports.
-# Do not use this number for new Ocata work, which starts after
-# all the placeholders.
-
-
-def upgrade(migrate_engine):
- pass
diff --git a/heat/db/sqlalchemy/migrate_repo/versions/078_placeholder.py b/heat/db/sqlalchemy/migrate_repo/versions/078_placeholder.py
deleted file mode 100644
index e46d47580..000000000
--- a/heat/db/sqlalchemy/migrate_repo/versions/078_placeholder.py
+++ /dev/null
@@ -1,20 +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 Newton backports.
-# Do not use this number for new Ocata work, which starts after
-# all the placeholders.
-
-
-def upgrade(migrate_engine):
- pass
diff --git a/heat/db/sqlalchemy/migrate_repo/versions/079_resource_properties_data.py b/heat/db/sqlalchemy/migrate_repo/versions/079_resource_properties_data.py
deleted file mode 100644
index 574450654..000000000
--- a/heat/db/sqlalchemy/migrate_repo/versions/079_resource_properties_data.py
+++ /dev/null
@@ -1,55 +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.
-
-from migrate.changeset import constraint
-import sqlalchemy
-
-from heat.db.sqlalchemy import types
-
-
-def upgrade(migrate_engine):
- meta = sqlalchemy.MetaData(bind=migrate_engine)
-
- resource_properties_data = sqlalchemy.Table(
- 'resource_properties_data', meta,
- sqlalchemy.Column('id', sqlalchemy.Integer,
- primary_key=True,
- nullable=False),
- sqlalchemy.Column('data', types.Json),
- sqlalchemy.Column('encrypted', sqlalchemy.Boolean),
- sqlalchemy.Column('created_at', sqlalchemy.DateTime),
- sqlalchemy.Column('updated_at', sqlalchemy.DateTime),
- mysql_engine='InnoDB',
- mysql_charset='utf8'
- )
- resource_properties_data.create()
-
- resource = sqlalchemy.Table('resource', meta, autoload=True)
- rsrc_prop_data_id = sqlalchemy.Column('rsrc_prop_data_id',
- sqlalchemy.Integer)
- rsrc_prop_data_id.create(resource)
- res_fkey = constraint.ForeignKeyConstraint(
- columns=[resource.c.rsrc_prop_data_id],
- refcolumns=[resource_properties_data.c.id],
- name='rsrc_rsrc_prop_data_ref')
- res_fkey.create()
-
- event = sqlalchemy.Table('event', meta, autoload=True)
- rsrc_prop_data_id = sqlalchemy.Column('rsrc_prop_data_id',
- sqlalchemy.Integer)
- rsrc_prop_data_id.create(event)
- ev_fkey = constraint.ForeignKeyConstraint(
- columns=[event.c.rsrc_prop_data_id],
- refcolumns=[resource_properties_data.c.id],
- name='ev_rsrc_prop_data_ref')
- ev_fkey.create()
diff --git a/heat/db/sqlalchemy/migrate_repo/versions/080_resource_attrs_data.py b/heat/db/sqlalchemy/migrate_repo/versions/080_resource_attrs_data.py
deleted file mode 100644
index 4636d1e76..000000000
--- a/heat/db/sqlalchemy/migrate_repo/versions/080_resource_attrs_data.py
+++ /dev/null
@@ -1,31 +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.
-
-from migrate.changeset import constraint
-import sqlalchemy
-
-
-def upgrade(migrate_engine):
- meta = sqlalchemy.MetaData(bind=migrate_engine)
-
- resource = sqlalchemy.Table('resource', meta, autoload=True)
- resource_properties_data = sqlalchemy.Table('resource_properties_data',
- meta, autoload=True)
- attr_data_id = sqlalchemy.Column('attr_data_id',
- sqlalchemy.Integer)
- attr_data_id.create(resource)
- res_fkey = constraint.ForeignKeyConstraint(
- columns=[resource.c.attr_data_id],
- refcolumns=[resource_properties_data.c.id],
- name='rsrc_attr_data_ref')
- res_fkey.create()
diff --git a/heat/db/sqlalchemy/migrate_repo/versions/081_placeholder.py b/heat/db/sqlalchemy/migrate_repo/versions/081_placeholder.py
deleted file mode 100644
index 4378ff335..000000000
--- a/heat/db/sqlalchemy/migrate_repo/versions/081_placeholder.py
+++ /dev/null
@@ -1,20 +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 Pike backports.
-# Do not use this number for new Queens work, which starts after
-# all the placeholders.
-
-
-def upgrade(migrate_engine):
- pass
diff --git a/heat/db/sqlalchemy/migrate_repo/versions/082_placeholder.py b/heat/db/sqlalchemy/migrate_repo/versions/082_placeholder.py
deleted file mode 100644
index 4378ff335..000000000
--- a/heat/db/sqlalchemy/migrate_repo/versions/082_placeholder.py
+++ /dev/null
@@ -1,20 +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 Pike backports.
-# Do not use this number for new Queens work, which starts after
-# all the placeholders.
-
-
-def upgrade(migrate_engine):
- pass
diff --git a/heat/db/sqlalchemy/migrate_repo/versions/083_placeholder.py b/heat/db/sqlalchemy/migrate_repo/versions/083_placeholder.py
deleted file mode 100644
index 4378ff335..000000000
--- a/heat/db/sqlalchemy/migrate_repo/versions/083_placeholder.py
+++ /dev/null
@@ -1,20 +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 Pike backports.
-# Do not use this number for new Queens work, which starts after
-# all the placeholders.
-
-
-def upgrade(migrate_engine):
- pass
diff --git a/heat/db/sqlalchemy/migrate_repo/versions/084_placeholder.py b/heat/db/sqlalchemy/migrate_repo/versions/084_placeholder.py
deleted file mode 100644
index 4378ff335..000000000
--- a/heat/db/sqlalchemy/migrate_repo/versions/084_placeholder.py
+++ /dev/null
@@ -1,20 +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 Pike backports.
-# Do not use this number for new Queens work, which starts after
-# all the placeholders.
-
-
-def upgrade(migrate_engine):
- pass
diff --git a/heat/db/sqlalchemy/migrate_repo/versions/085_placeholder.py b/heat/db/sqlalchemy/migrate_repo/versions/085_placeholder.py
deleted file mode 100644
index 4378ff335..000000000
--- a/heat/db/sqlalchemy/migrate_repo/versions/085_placeholder.py
+++ /dev/null
@@ -1,20 +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 Pike backports.
-# Do not use this number for new Queens work, which starts after
-# all the placeholders.
-
-
-def upgrade(migrate_engine):
- pass
diff --git a/heat/db/sqlalchemy/migrate_repo/versions/086_drop_watch_rule_watch_data_tables.py b/heat/db/sqlalchemy/migrate_repo/versions/086_drop_watch_rule_watch_data_tables.py
deleted file mode 100644
index a99ac5c4e..000000000
--- a/heat/db/sqlalchemy/migrate_repo/versions/086_drop_watch_rule_watch_data_tables.py
+++ /dev/null
@@ -1,53 +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.
-
-from migrate import ForeignKeyConstraint
-from sqlalchemy.engine import reflection
-from sqlalchemy import MetaData
-from sqlalchemy import Table
-
-
-def upgrade(engine):
- meta = MetaData()
- meta.bind = engine
-
- def _get_columns(source_table, params):
- columns = set()
- for column in params:
- columns.add(source_table.c[column])
- return columns
-
- def _remove_foreign_key_constraints(engine, meta, table_name):
- inspector = reflection.Inspector.from_engine(engine)
-
- for fk in inspector.get_foreign_keys(table_name):
- source_table = Table(table_name, meta, autoload=True)
- target_table = Table(fk['referred_table'], meta, autoload=True)
-
- fkey = ForeignKeyConstraint(
- columns=_get_columns(source_table, fk['constrained_columns']),
- refcolumns=_get_columns(target_table, fk['referred_columns']),
- name=fk['name'])
- fkey.drop()
-
- def _drop_table_and_indexes(meta, table_name):
- table = Table(table_name, meta, autoload=True)
- for index in table.indexes:
- index.drop()
- table.drop()
-
- table_names = ('watch_data', 'watch_rule')
-
- for table_name in table_names:
- _remove_foreign_key_constraints(engine, meta, table_name)
- _drop_table_and_indexes(meta, table_name)
diff --git a/heat/db/sqlalchemy/migrate_repo/versions/__init__.py b/heat/db/sqlalchemy/migrate_repo/versions/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/heat/db/sqlalchemy/migrate_repo/versions/__init__.py
+++ /dev/null
diff --git a/requirements.txt b/requirements.txt
index 7794a608b..dddc4239e 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -63,7 +63,6 @@ requests>=2.23.0 # Apache-2.0
tenacity>=6.1.0 # Apache-2.0
Routes>=2.3.1 # MIT
SQLAlchemy>=1.4.0 # MIT
-sqlalchemy-migrate>=0.13.0 # Apache-2.0
stevedore>=3.1.0 # Apache-2.0
WebOb>=1.7.1 # MIT
yaql>=1.1.3 # Apache 2.0 License