These are no longer used and no longer necessary. Remove them.
Change-Id: Ibd7d46aefb3794dd342c8afb40dbb8d4ce00a976
Implements: blueprint remove-sqlalchemy-migrate
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
As downgrade are not supported after Kilo, we should remove them now.
Roll backs can be performed as mentioned in the below link:
http://docs.openstack.org/ops-guide/ops-upgrades.html#rolling-back-a-failed-upgrade
The DB downgrades were deprecated in Glance Mitaka release by commit
e3366afdfb.
Change-Id: I937d15d93f16a3e44a50e6ff1a469098eab67c79
Implements: blueprint remove-db-downgrade
It's not pythonic to use parentheses in conditional statements which can
fit into single line. Following patch removes redundant parentheses from
the code.
Change-Id: I01544931cc49b250b8224a593c64d7b59b576799
oslo_db was moved out of the oslo namespace in
oslo.db>=1.4.0.
Change-Id: I13620d26ff12c55b2294b3b051669e0e98513a10
Related-to: blueprint drop-namespace-packages
Since the move to oslo.db, sqlalchemy no longer raises
ProgrammingError. Instead, it is wrapped in a
oslo.db.exception.DBError. This causes migration to fail on older
postgres, which relies on catching this error to use the correct
constraint name.
Change-Id: Icf7b20eb4e09f3c91aa3df3bcea497f810a6f907
This commit makes the glance code base E125 and E126 compliant :
* E125 continuation line does not distinguish itself from next logical line
* E126 continuation line over-indented for hanging indent
Change-Id: I7120149bedb665fb66320498fe98948602a6cd52
Closes-bug: #1263437
Fixes bug 1160114
The initial version of the 022_image_member_index migration
hardcoded the default naming convention for unqiue constraints
used by PostgreSQL 9.2, which turns out to different to the
convention used by PostgreSQL 8.4. This causes the CI to fail
(non-voting) against RHEL.
We resolve the issue by falling back to inferring the existing
unique constraint name from the image_members indices.
Change-Id: Iad6db033e63cdfd7a77db44bdeaed2284699b469
Fixes bug #1098700.
Previously, deleting then re-creating an image member failed with
500 ServerError due to the registry service failing to commit
the update to the image_members table.
The problem arose because the declared uniqueness constraint on that
table only spanned the image_id and member columns, but did not take
into account that deleted rows are left in situ with the deleted_at
and deleted columns set as appropriate. Hence the unique constraint
was violated by the addition of the new row.
We modify the uniqueness constraint via a migration script to take
account of the deleted_at column also (NULL for live memberships).
Note that the new ability to recreate an image membership cannot be
be asserted in a functional test, as these tests are based on sqlite
which does not support 'ALTER TABLE DROP CONSTRAINT'.
Change-Id: I175801ba95ecd9295791bb12e9096f59efa19c02