summaryrefslogtreecommitdiff
path: root/migrate/changeset/databases/sqlite.py
Commit message (Collapse)AuthorAgeFilesLines
* Retire github mirror, repo moved to opendevHEADmasterJim Rollenhagen2019-09-261-229/+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
* | Use legacy_alter_table ON in sqlite recreate_tableCorey Bryant2019-01-151-0/+9
|/ | | | | | | | | | | | | | | | | | | | | Use "PRAGMA legacy_alter_table = ON" with sqlite >= 3.26 when using "ALTER TABLE RENAME TO migration_tmp" to maintain legacy behavior. As of sqlite version 3.26, when a table is renamed using "ALTER TABLE RENAME TO", REFERENCES clauses that refer to the table will be updated. To maintain legacy (3.24 and earlier) behavior, "PRAGMA legacy_alter_table" can be set to true and "PRAGMA foreign_keys" can be set to false. [1] [1] https://www.sqlite.org/src/info/ae9638e9c0ad0c36 Thanks to "László Böszörményi (GCS)" <gcs@debian.org> for providing the code for this patch, which has since been slightly modified. Change-Id: I539988ab2ad6df6c8f423ecec15364ad8fcc7267 Closes-Bug: 1807262
* allow dropping fkeys with sqliteMatt Riedemann2015-02-201-17/+36
| | | | | | | | | | | | | This implements the ability to drop foreign keys with sqlite. It's basically the same implementation used for dropping unique constraints so the common code is refactored. The existing FKey test that was skipping sqlite is no longer skipped to show this works. Change-Id: Idaaf4229e34af4c21c3bcead4b4e22491d24238e Closes-Bug: #1423955
* Merge "Move patch from oslo to drop unique constraints with sqlite"0.9.1Jenkins2014-05-051-3/+48
|\
| * Move patch from oslo to drop unique constraints with sqliteMatt Riedemann2014-04-151-3/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | oslo-incubator commit 3f503faac for making sqlite work with dropping unique constraints in database migrations. This was made in oslo-incubator since at the time sqlalchemy-migrate was not in stackforge. Now that we can update sqlalchemy-migrate, move the patch over from oslo. This change also adds the support for the case that a unique constraint is dropped because the column it's on is dropped. Note that there are already unit tests that cover dropping a unique constraint directly and implicitly via dropping a column that is in the unique constraint. Related-Bug: #1307266 Change-Id: I5ee8082a83aebf66f6e1dacb093ed79e13f73f5e
* | Port to Python3Cyril Roelandt2014-04-091-1/+4
|/ | | | | | | | | | | | | | | | | | 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-261-3/+3
| | | | | | | | | | 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
* merge e5bd2821eea8 from https://code.google.com/r/alyazdi-patches/Jan Dittberner2011-10-281-1/+1
|\ | | | | (fixes issue 125)
| * Fix for issue #125, create the table on the same connection as the ALTER and ↵al.yazdi@gmail.com2011-10-261-1/+1
| | | | | | | | INSERT happen
* | drop SQLAlchemy < 0.6 compatibility codeJan Dittberner2011-10-281-5/+3
|/
* remove the alter_metadata featureChris Withers2011-02-101-3/+1
|
* fix sqlite column dropper now that the table is only modified after the ↵Chris Withers2011-02-101-0/+9
| | | | visitor is run
* Fix issue 94 - it was impossible to add a column with a non-unique index.chrisw2010-09-091-10/+16
| | | Also implement more functionality with unique and foreign key constrains for sqlite.
* implement column adding with foreign keys on sqlitechrisw2010-09-091-7/+19
|
* fix for issue 96: deleting a column in sqlite shouldn't delete all indexeschrisw2010-09-091-9/+4
| | | bonus: remove_from_table now removes indexes
* move all exception classes to migrate.exceptionsiElectric2010-09-071-1/+3
|
* move to unittest2, update README for testing instructionsiElectric2010-06-201-0/+1
|
* add support for SA 0.6 by Michael BayeriElectric2009-06-291-5/+6
|
* add not supported exceptions for sqlite constraintsiElectric2009-06-271-3/+19
|
* - completely refactored ColumnDelta to extract differences between ↵iElectric2009-06-271-8/+20
| | | | | | | | columns/parameters (also fixes issue #23) - fixed some bugs (passing server_default) on column.alter - updated tests, specially ColumnDelta and column.alter - introduced alter_metadata which can preserve altering existing objects if False (defaults to True) - updated documentation
* updated changeset tests. whole package is finally PEP8. fixed mysql ↵iElectric2009-06-201-10/+10
| | | | tests&bugs. updated docs where apropriate. changeset test coverage almost at 100%
* - refactor migrate.changeset;iElectric2009-06-161-26/+25
| | | | | | | - visitors are refactored to be more unified - constraint module is refactored, CheckConstraint is added - documentation is partialy updated, dialect support table is added (unfinished) - test_constraint was updated NOTE: oracle and mysql were not tested, *may be broken*
* use sqlalchemy preparer to do SQL quote formatting. this is a raw change, ↵iElectric2009-06-111-12/+9
| | | | tests are yet to be written
* mark ALTER TABLE ADD FOREIGN KEY as unsupported by SQLitejan.dittberner2009-02-181-0/+12
| | | update corresponding test case
* revert stupid test case breaking changejan.dittberner2009-01-251-2/+3
|
* make migrate.changeset.databases PEP-8 clean and add it to the API docsjan.dittberner2009-01-251-12/+30
|
* apply patch for Issue #43 (better SQLite support) by Florian Apollonerjan.dittberner2008-12-301-13/+37
|
* most of the tests are now working with nose.percious172008-12-021-0/+3
|
* integrated patch by Christian Simms posted at ↵jan.dittberner2008-02-141-1/+1
| | | | | | http://groups.google.com/group/migrate-users/browse_thread/thread/952a2185baf70c4d fix all test cases for sqlalchemy>=0.4 and still works with sqlalchemy>=0.3.10 fixes #9
* moved trunk, branches and tags to project rootjan.dittberner2008-02-061-0/+49
fixes Issue #5