Commit Graph

10 Commits

Author SHA1 Message Date
Stephen Finucane b28b0e29d2 db: Remove old sqlalchemy-migrate migrations
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>
2021-07-13 17:18:55 +01:00
wangxiyuan 2f803d3fa9 Remove DB downgrade
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
2016-09-01 10:53:08 +08:00
Kamil Rykowski 58667c1bc4 Remove redundant parentheses in conditional statements
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
2015-02-17 12:35:26 +01:00
Louis Taylor e42fad7385 Move from oslo.db to oslo_db
oslo_db was moved out of the oslo namespace in
oslo.db>=1.4.0.

Change-Id: I13620d26ff12c55b2294b3b051669e0e98513a10
Related-to: blueprint drop-namespace-packages
2015-01-12 19:03:20 +00:00
Matthew Booth 8c9c5020fd Fix migration on older postgres
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
2014-08-08 15:58:46 +01:00
Alex Gaynor 69415fcec9 Fixed a handful of typos
Change-Id: Ieae86b435f9d542e1308a8e1d7d0c5cea9c7d076
2014-05-02 00:18:34 -07:00
Noboru arai 8de10b0f34 Remove vim header
No need to set tabstop tons of times, this can be set in your vimrc
file instead.

More disucssion:
http://openstack.10931.n7.nabble.com/Remove-vim-modelines-td21780.html

Change-Id: I3b830a5bb831a63c188109e6fad66ba48884fff3
Partial-Bug: #1229324
2014-01-14 16:03:28 +00:00
Yanis Guenane ec08ca1a87 Make code base E125 and E126 compliant
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
2013-12-30 13:03:24 +00:00
Eoghan Glynn e9079d0fd5 Fallback to inferring image_members unique constraint name
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
2013-03-27 20:33:59 +00:00
Eoghan Glynn c4f97dfa6e Fix uniqueness constraint on image_members table.
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
2013-03-13 16:03:12 -07:00