summaryrefslogtreecommitdiff
path: root/migrate/changeset/schema.py
Commit message (Collapse)AuthorAgeFilesLines
* Retire github mirror, repo moved to opendevHEADmasterJim Rollenhagen2019-09-261-705/+0
|
* Merge "Import MutableMapping from the correct Python module"Zuul2019-01-211-1/+1
|\
| * Import MutableMapping from the correct Python moduleChih-Hsuan Yen2019-01-151-1/+1
| | | | | | | | Change-Id: Ifb66fe22bc607b13f5c4756d3b93f5e8206c33e3
* | Don't use deprecated / non-functional "force" parameterMike Bayer2019-01-181-2/+0
|/ | | | | | | | | | | The "force" parameter in SQLAlchemy IdentifierPreparer.quote() has been a no-op since 0.9 in https://github.com/sqlalchemy/sqlalchemy/commit/031ef0807838842a827135dbace760da7aec215e, which was six years ago. In SQLAlchemy 1.3 this parameter will be removed entirely. Bump requirements to 0.9 series here and remove usage of the "force" flag. Change-Id: I4492df2e7d2075fefbf13d6782de11f7d402f6b8
* Set autoincrement to False when modifying to non-Integer datatypeMike Bayer2016-10-201-2/+8
| | | | | | | | | | | | Starting in SQLAlchemy 1.1, the rules for when "autoincrement=True" may be set on a column are more strict. The migrate tests are testing the alteration of a column from Integer to String and then regenerating; this means we need to set autoincrement to False as well. A related issue in SQLAlchemy 1.1 is also being fixed (see https://bitbucket.org/zzzeek/sqlalchemy/issues/3835/), however this fix is not needed in order for the tests to pass here. Change-Id: Ibd3a75fff13312411df87e17b6e5764865d69728
* Port to Python3Cyril Roelandt2014-04-091-8/+50
| | | | | | | | | | | | | | | | | | 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>
* Replace AbstractType by TypeEngineThomas Goirand2014-03-051-1/+1
| | | | | | | AbstractType not longer exists in the class hierarchy for types. TypeEngine was its direct descendant, so use that instead. Change-Id: Idbfaee4b0d3acbc4795913ddf2ab4e1c9b6d065c
* Use native quote attribute introduced in sqla 0.9Thomas Goirand2014-03-051-17/+19
| | | | | | | | | In SQLA 0.9 there is now a native .quote attribute on many objects. Conditionally use this instead of the old method if the attribute exists, to remove deprecation messages (and prepare for when the other way will be fully removed). Change-Id: I3c5fada13e044c1c4102acc0455226ce1524f2e2
* Fix dropping of indexed columns in sqlite/sa08Roman Podolyaka2013-10-181-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Version 0.8 of SQLAlchemy added support of indexes on expressions in addition to plain table columns, which changed the way indexes are created. This broke support of dropping columns of composite indexes for SQLite: due to limitations of ALTER in SQLite every time a column is dropped, we recreate the whole table without the given column; if a column is a part of a composite index, we change the index definition to omit that column and then indexes are recreated too. SQLAlchemy versions starting from 0.8 no more pay attention to 'columns' attribute of Index instances when generating DDL for indexes, so when one of columns of a composite index is dropped, we try to create a new index on the column that doesn't exist anymore, which of course fails. Closes-Bug: #1241038 Change-Id: I777b8ce36e36f49bfb0889908811a063cf1a527b
* drop SQLAlchemy < 0.6 compatibility codeJan Dittberner2011-10-281-8/+2
|
* fix SQLAlchemy 0.6.x compatibility of issue 128 patchJan Dittberner2011-10-281-1/+11
|
* fix issue 128: "table rename failure with sqlalchemy 0.7.x"markbmc@gmail.com2011-10-281-7/+1
|
* fix column.create() properlyJan Dittberner2011-05-271-1/+4
|
* use Table._columns to remove columns (addresses #112)Jan Dittberner2011-05-251-2/+5
| | | | | | - add SQLA_07 predicate in migrate/changeset/__init__.py - use Table._columns instead of Table.c when removing columns in migrate/changeset/schema.py
* Bring back alter_metadata on ColumnDelta: it seems intertwined with a lot of ↵Chris Withers2011-02-111-14/+38
| | | | | the tests. So, it's a private API now...
* remove the alter_metadata featureChris Withers2011-02-101-64/+23
|
* Only alter the SA objects after running the visitor, so the visitor may inspectChris Withers2011-02-101-2/+1
|
* Fix issue 94 - it was impossible to add a column with a non-unique index.chrisw2010-09-091-5/+8
| | | Also implement more functionality with unique and foreign key constrains for sqlite.
* Fix bug with column dropping involving foreign keys.chrisw2010-09-091-0/+18
| | | Bonus: remove_from_table now understands foreign keys
* fix for issue 96: deleting a column in sqlite shouldn't delete all indexeschrisw2010-09-091-1/+12
| | | bonus: remove_from_table now removes indexes
* attempt at improving the api docs a littlechrisw2010-09-081-19/+25
|
* - capture deprecation warnings and assert they re as they should bechrisw2010-09-071-2/+5
| | | - re-word alter_column deprecation warning to make more sense
* move all exception classes to migrate.exceptionsiElectric2010-09-071-1/+1
|
* small doc correction; fixes #67iElectric2010-07-111-1/+4
|
* better document summary of changeset actionsiElectric2010-07-111-12/+7
|
* adding connection keyword to ORM methodsiElectric2010-07-111-10/+21
|
* unified warnings, use compare columns in testsiElectric2010-05-011-2/+4
|
* move warning exceptions to right moduleiElectric2010-05-011-1/+0
|
* deprecate two columns alteriElectric2010-04-301-0/+5
|
* partly fix SA0.6 tests on postgresiElectric2010-04-241-2/+2
|
* more SA06 fixesiElectric2010-02-051-2/+2
|
* SA06 fixeshudson@fubarite.fubar.si2010-02-051-2/+9
|
* apply Emil Kroymann's patch for Issue 75emil.kroymann2010-01-071-1/+1
|
* add populate_default kwarg to column.create, fixes issue #50iElectric2009-07-011-0/+9
|
* convert svn to hgiElectric2009-06-301-0/+597