summaryrefslogtreecommitdiff
path: root/migrate/versioning/script
Commit message (Collapse)AuthorAgeFilesLines
* Retire github mirror, repo moved to opendevHEADmasterJim Rollenhagen2019-09-264-296/+0
|
* script: strip comments in SQL statementsIhar Hrachyshka2015-01-141-0/+1
| | | | | | | | | Regular expression does not match correctly against statements that contain comments at their start. So strip those comments first (and whitespaces, while we are at it). Change-Id: Iad9b544bf995374d76cab1e125658aae2f8511f4 Closes-Bug: #1410494
* Ignore transaction management statements in SQL scriptsIhar Hrachyshka2015-01-091-1/+18
| | | | | | | | | | | | | | | | | | | | Now that we don't run SQL script with a single .execute() call, transaction management statements (BEGIN, COMMIT, END) fail with operational error. Ignore them if occurred in a script. All in all, transactions are managed by SQLAlchemy-migrate itself, so there is no reason for the calling code to pass those statements in a SQL script. Warn user about the statements that are ignored. The ideal response to such a warning from library users is removing those redundant transaction management statements from their scripts. Note: ROLLBACK is not ignored even though it's one of transaction management statements because its usage in migration scripts is insane anyway, and we're better fail on it and not (almost) silently ignore it. Change-Id: Ie4179c0e9341d42656d66821aaac23f8dcd33927 Closes-bug: 1368391
* SqlScript: execute multiple statements one by one0.9.2Ihar Hrachyshka2014-08-231-8/+10
| | | | | | | | | | | | | | | | | Some drivers [f.e. MySQL Connector] do not like multiple statements being passed to .execute(). They require either passing multi=True parameter to .execute() that is not DB-API 2.0 defined, or executing those statements one by one. For that patch, I've chosen the second option to stay away from driver specific hacks. Also removed SQLite hack that seems to be related to the same multiple statements issue. blueprint enable-mysql-connector Change-Id: Ic6d53ed1fef8aee9471f3540f06b39cd5ee4ef82
* Make sure we don't throw away exception on SQL script failureIhar Hrachyshka2014-08-231-1/+2
| | | | | | | | | If SQL script failed, we don't currently log the failure anywhere, so users have hard time debugging an issue, if anything arises. Let's log the failure before proceeding with rollback. Change-Id: Ic92b1403c00bb238a68265a15150a4be6f6b2346
* Port to Python3Cyril Roelandt2014-04-091-4/+7
| | | | | | | | | | | | | | | | | | Brief summary of the modifications: * Use six for compatibility with both Python 2 and 3; * Replace UserDict.DictMixin with collections.MutableMapping; * Fix relative imports; * Use test-requirements.txt for requirements that are common to both Python 2 and 3, and test-requirements-py{2,3}.txt for version-specific requirements; * Miscellaneous fixes. * Use a specific test_db_py3.cfg file for Python 3, that only runs tests on sqlite. Thanks to Victor Stinner who co-wrote this patch. Change-Id: Ia6dc536c39d274924c21fd5bb619e8e5721e04c4 Co-Authored-By: Victor Stinner <victor.stinner@enovance.com>
* Eradicate trailing whitespaceDavid Ripton2014-02-262-2/+2
| | | | | | | | | | Remove all trailing spaces and tabs in every file in the project. People have editors configured to do this, which causes them to accidentally make little whitespace changes in unrelated commits, which makes those commits harder to review. Better to fix them all at once. Change-Id: I17d89f55f41d8599e0ab1a31f646cd161289703e
* Fix and test issue 118. Clarify genmodel transformations.Gabriel2011-07-051-8/+8
|
* fix py2.4 and py2.5Domen Kožar2011-02-051-1/+1
|
* fixes #106Domen Kožar2011-02-051-6/+7
|
* use absolute imports of exception classes (fixes tests)Jan Dittberner2010-11-071-6/+6
|
* rewrite of schemadiff internalschrisw2010-09-101-2/+1
|
* move all exception classes to migrate.exceptionsiElectric2010-09-072-6/+7
|
* correct case for dependencies in setup.pyiElectric2010-08-161-1/+2
|
* fix deprecation warning when using old script syntaiElectric2010-07-091-1/+1
|
* unified warnings, use compare columns in testsiElectric2010-05-011-1/+1
|
* added 0.6 TODO, all api now uses engine.dispose() to handle pool correctlyiElectric2010-04-291-6/+9
|
* mergeiElectric2009-08-103-18/+34
|\
| * use logging module for output, fixes #26iElectric2009-07-083-4/+13
| |
| * add tests for plain API, fixed some small bugsiElectric2009-07-082-13/+20
| |
| * convert svn to hgiElectric2009-06-304-0/+252
|
* remove versioning.base in favor of versioning.configiElectric2009-08-072-4/+8
|
* add option to customize templates and use multiple themesiElectric2009-07-281-8/+3
|
* add support for SA 0.6 by Michael BayeriElectric2009-06-291-1/+1
|
* some more PEP8 loveiElectric2009-06-211-1/+1
|
* updated changeset tests. whole package is finally PEP8. fixed mysql ↵iElectric2009-06-201-1/+2
| | | | tests&bugs. updated docs where apropriate. changeset test coverage almost at 100%
* update documentationiElectric2009-06-121-1/+4
|
* removed magical behavior with importing migrate_engine, now engine is passed ↵iElectric2009-06-121-6/+2
| | | | to upgrade/downgrade functions
* lipstick changesiElectric2009-06-101-0/+1
|
* update tests and docs for migrate.versioning.script.*iElectric2009-06-084-31/+91
|
* rearange testsiElectric2009-06-071-3/+2
|
* add tests for low level util.pyiElectric2009-06-062-4/+4
|
* Issue 34; preview_sql now correctly displays SQL on python and SQL scripts. ↵iElectric2009-06-062-35/+66
| | | | (tests added, docs still missing)
* more migrate deprecation removal fixes.percious172008-12-031-1/+4
|
* hopefully the last of migrate.runpercious172008-12-021-1/+1
|
* more "run" removal.percious172008-12-021-3/+3
|
* almost done issue 12: generate downgrade method for schema migrationchristian.simms2008-04-241-9/+5
|
* Change make_update_script_for_model shell command to compare two versions of ↵christian.simms2008-04-061-4/+5
| | | | Python model (issue #12); add shell test for new diff'ing apis
* code reorg: create new utility method loadModel for db diffingchristian.simms2008-04-011-7/+2
|
* rename model/db sync commands and add new command update_db_from_modelchristian.simms2008-03-241-1/+1
|
* add experimental support for comparing metadata against database (issue #12)christian.simms2008-03-221-1/+32
|
* moved trunk, branches and tags to project rootjan.dittberner2008-02-064-0/+135
fixes Issue #5