Commit Graph

3 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
Matthew Treinish 70907328ea Enable support for MySQL with test migrations.
This commit makes the necessary changes to enable the migrations
tests to pass with both mysql and sqlite. However the proper mysql
database still needs to be created beforehand for the tests to run
with mysql.

The sqlalchemy alter() method breaks on sqlite when mysql is enabled
for other databases. So for sqlite testing the alter() calls are now
done manually.

This also adds the MySQL-python module to the test-requires list
so that it will get installed for CI and the virtualenv used for
unit tests.

Change-Id: Ic72476b8e6a910c25747641ef1882639019b433e
2013-02-28 11:57:33 -05:00