Commit Graph

5 Commits

Author SHA1 Message Date
Stephen Finucane ce5056ad3a db: Replace dict-style access of Row attributes
Resolve the following RemovedIn20Warning:

  Using non-integer/slice indices on Row is deprecated and will be
  removed in version 2.0; please use row._mapping[<key>], or the
  mappings() accessor on the Result object.

Change-Id: Ife8bdf766eb6d6fe9748565c9c61aa971d1af6f8
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-07-24 21:34:11 +00:00
Zuul f094b7d2b2 Merge "tests: Remove use of 'oslo_db.sqlalchemy.test_base'" 2021-08-25 11:30:09 +00:00
Stephen Finucane 9e002a77f2 Resolve compatibility with oslo.db future (redux)
Build on change I957d2a9d7c875120bed0022ce1e953b2ec9f97cd by addressing
additional issues introduced by future breaking changes in oslo.db. As
with this change, the changes stem from the table returned from
'oslo_db.utils.get_table' being no longer bound to a 'Connection' or
'Engine'.

Change-Id: Ic28bef6ad4e47a86e423a10e8479b60134cbb0a5
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Related-Bug: #1939716
2021-08-16 11:57:29 +01:00
Stephen Finucane 815922fbee tests: Remove use of 'oslo_db.sqlalchemy.test_base'
The various test cases and mixins in 'oslo_db.sqlalchemy.test_base' have
been deprecated since oslo.db 4.34.0 (March 2018). Remove use of these.

Change-Id: I6618366e6464d569a86fb027919be2e1825e438c
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-07-28 16:40:17 +01:00
Hemanth Makkapati 9859df2d1f Add expand/migrate/contract migrations for CI
This patch adds equivalent expand/migrate/contract migration scripts for
Community Images. The expand migration
'ocata_expand01_add_visibility.py' creates a new migration branch 'expand'
from the last known migration i.e., 'mitaka02'. Similarly, the contract
migration 'ocata_contract01_drop_is_public.py' creates another new
migration branch called 'contract' from the last known migration.

The data migration 'ocata_migrate01_community_images.py' migrates
all rows in the database at once. There is possibility of performance
degradation while the data migrations are running.

Change-Id: I34f5623d6804e9fe594e6b5b196ea4a162578196
Partially-Implements: blueprint database-strategy-for-rolling-upgrades
Co-Authored-By: Hemanth Makkapati <hemanth.makkapati@rackspace.com>
Depends-On: Ie839e0f240436dce7b151de5b464373516ff5a64
2017-02-02 00:16:04 +00:00