summaryrefslogtreecommitdiff
path: root/oslo_db/sqlalchemy/migration.py
Commit message (Collapse)AuthorAgeFilesLines
* Throw DBMigrationError instead of DbMigrationError.Yaguo Zhou2017-09-081-1/+1
| | | | | | | | | | Stop throwing the deprecated DbMigrationError exception, Use the new DBMigrationError exception instead, so that the consumers can catch the new exception. DbMigrationError will not be removed until no consumers still use it. Change-Id: Iab0566cf9f4552e91fa417e64472fa106e8bc86d
* Raise only DbMigrationError from migrate 'upgrade' methoddineshbhor2017-05-251-1/+4
| | | | | | | | | | | | All the exceptions which are raised from sqlalchemy-migrate upgrade method are not more user friendly to the operator. This patch proposes to convert all the exceptions which will be raised by 'upgrade' method to an oslo_db specific 'DbMigrationError' exception. Related-Bug: #1546441 Change-Id: I28533bedba358281ce302b9b021744387a76c04a
* Merge "Fix db_version checking for sqlalchemy-migrate"Jenkins2017-03-031-1/+2
|\
| * Fix db_version checking for sqlalchemy-migrateBrant Knudson2016-04-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a project has multiple migration repos and oslo_db.sqlalchemy.migration.db_version() is called using the one repo as the abs_path, it will attempt to put the repo under version control. The next time it's called with the other abs_path, it would fail rather than attempting to put the repo under version control when using sqlalchemy-migrate. When using alembic, db_version would attempt to put the new abs_path under version control. This change makes it so that when sqlalchemy-migrate is used db_version() will attempt to version control the new abs_path just like when alembic is used. Change-Id: If5e2ae1a72f9118c7aca34e925fdc5e3e8480275
* | exception: make message mandatory in DbMigrationError and deprecates itJulien Danjou2016-06-271-10/+8
| | | | | | | | | | | | | | | | | | | | | | An exception message with None as an error message is not really useful. Since DbMigrationError is also wrongly written with a lower case b whereas everything else has a major B, let's create a new correct class and use it. debtcollector is used to deprecate the old one, and inheritance makes sure the current code works. Change-Id: Id9a477aff38afd5b664b75a549ad561f4c24b6f0
* | Merge "Raise DbMigrationError for invalid version"Jenkins2016-05-101-1/+8
|\ \
| * | Raise DbMigrationError for invalid versiondineshbhor2016-03-301-1/+8
| |/ | | | | | | | | | | | | | | | | Caught InvalidVersionError and DatabaseAlreadyControlledError and raised oslo_db specific DbMigrationError exception if given invalid version as a argument to db_version_control() method. Related-Bug: #1546441 Change-Id: Ic2c3ab5bd83c206a14d9bacf4b477198c06a55f5
* | Correct docstringBrant Knudson2016-04-121-1/+1
|/ | | | | | The docstring was using the wrong parameter name. Change-Id: Icb1afbaba8cd618be2670845fe36fba66e1d042a
* Sanity check after migrationMarco Fargetta2015-04-101-3/+7
| | | | | | | | | | Added a sanity_check call after the migration, so if a table in the migration scripts is created not correctly the exception arise before to go in production. Closes-Bug: #1428065 Change-Id: Ib91f2471fa389a6072e8c2aa302504a6c068aa0a
* Move files out of the namespace packageDoug Hellmann2014-12-241-0/+160
Move the public API out of oslo.db to oslo_db. Retain the ability to import from the old namespace package for backwards compatibility for this release cycle. Blueprint: drop-namespace-packages Change-Id: Ie96b482b9fbcb1d85203ad35bb65c1f43e912a44