openstack-ironic/ironic/db/sqlalchemy
Julia Kreger 2b0a5575ce Fix online upgrades for Bios/Traits
... And tags, but nobody uses tags since it is not available
via the API.

Anyhow, the online upgrade code was written under the assumption
that *all* tables had an "id" column. This is not always true
in the ironic data model for tables which started as pure extensions
of the Nodes table, and fails in particular when:

1) A database row has data stored in an ealier version of the object
2) That same object gets a version upgrade.

In the case which discovered this, BIOSSetting was added at version
1.0, and later updated to include additional fields which incremented
the version to 1.1. When the upgrade went to evaluate and iterate
through the fields, the command failed because the table was designed
around "node_id" instead of "id".

Story: 2010632
Task: 47590

Change-Id: I7bec6cfacb9d1558bc514c07386583436759f4df
(cherry picked from commit cbe5f86ce7)
2023-03-15 15:41:47 +00:00
..
alembic Implements node history: database 2021-09-09 09:35:09 -07:00
__init__.py Fix compatibility with oslo.db 12.1.0 2022-09-05 17:32:18 +01:00
alembic.ini alembic with initial migration and tests 2014-01-27 16:06:57 +02:00
api.py Fix online upgrades for Bios/Traits 2023-03-15 15:41:47 +00:00
migration.py Replace DbMigrationError with DBMigrationError 2017-09-05 23:10:07 +08:00
models.py Implements node history: database 2021-09-09 09:35:09 -07:00