Commit Graph

4 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
Ihar Hrachyshka 92a7111e9e SQL scripts should not manage transactions
Glance SQL scripts assume too much about the environment and the way in
which they are executed by sqlalchemy-migrate. Particularly, they manage
transactions on their own even though sqlalchemy-migrate do it itself,
plus it assumes that scripts are executed in one go (even though
standard Python DB-API 2.0 does not mention multi-statement SQL commands
to be executed on DB cursors.

Also fix comments to be actual SQL comments and not C comments

https://blueprints.launchpad.net/oslo.db/+spec/enable-mysql-connector

Change-Id: I10c58b3af75d3ab9153a8bbd2a539bf1577de328
Closes-Bug: 1368391
Closes-Bug: 1410494
2015-01-13 22:21:00 +00:00
John Bresnahan 03c5a98b22 Insure that migration 6 retains deleted image property index.
Migration 6 for sqlite deletes the entire table and then recreates it,
however it fails to create the image_properties deleted index.

Fixes bug: 1051123

Change-Id: I4740ff1d5b9ec44067e6af7dd822329105222690
2013-03-07 13:53:11 -10:00
Brian Waldon a68eb24431 Create 'simple' db driver
Move the core of glance.tests.unit.utils:FakeDB to glance.db.simple.
This 'simple' driver is an alternative to the traditional sqlalchemy
driver. Additionally, the sqlalchemy driver has been moved from
glance.db to glance.db.sqlalchemy. The simple db driver is only
available to be used by tests for now.

Related to bp refactor-db-layer

Change-Id: I9d33a433c0c03e53fb5a3491076086427ae694b3
2012-06-07 09:20:50 -07:00