nova/nova/db/sqlalchemy/migrate_repo
Stephen Finucane 1da542ff7a db: Compact Liberty database migrations
Compact Liberty database migrations into a single migration,
'302_liberty.py'.

Users will now need to update to Liberty before updating to Mitaka or
later.

Specific changes include:

- Drop 'volumes', 'iscsi_targets' tables
- Add 'migration_type', 'hidden' columns to 'migrations' table
- Add 'last_seen_up' column to 'services' table
- Add index for 'uuid' column of 'virtual_interfaces' table
- Add 'forced_down' column to 'services' table
- Add 'version' column to 'services' table
- Add 'migration_context' column to 'migration_context' table
- Add index for 'instance_uuid' column of 'instance_system_metadata'
  table for PostgreSQL and SQLite; this was already present for MySQL

This hits the same issue seen previously of a constraint being added to
a boolean field in a shadow table on SQLite, despite this being disabled
for the main table. As before, we can ignore this given SQLite is not a
production DB.

We also hit another case of doing something to a main table but not its
shadow table, which will have to be resolved later.

Now that we can rely on flavor records having been migrated, we can
remove the 'db migrate_flavor_data' nova-manage command. This will be
done separately.

When testing, the previous base version was 279. It is now 301.

[1] https://github.com/sqlalchemy/alembic/issues/652

Change-Id: I9933a9e9087868f1cd92100b3e82c35fe02cab09
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-01-07 11:47:43 +00:00
..
versions db: Compact Liberty database migrations 2021-01-07 11:47:43 +00:00
README [doc] Updated sqlalchemy URL in migrate readme 2017-06-20 14:09:41 +00:00
__init__.py Removed copyright from empty files 2014-02-27 14:27:54 +02:00
manage.py Remove vi modelines 2014-02-03 14:19:44 +00:00
migrate.cfg Keep pre-commit inline with hacking and fix whitespace 2019-12-12 14:56:39 +00:00

README

This is a database migration repository.

More information at
https://sqlalchemy-migrate.readthedocs.io/en/latest/