40 Commits

Author SHA1 Message Date
Thomas Goirand
8d6ce64cd0 Use native quote attribute introduced in sqla 0.9
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
2014-03-05 08:20:49 -05:00
Thomas Goirand
98ae3ac832 UniqueConstraint named and escaped twice
This patch fixes get_constraint_name in the
ANSIConstraintCommon class. It's part of the
fixes needed for SQLA 0.9.x compat.

Change-Id: I1f1648af48f459bd18f99bb42fa9a272186fb37d
2014-03-02 13:12:45 +08:00
Pádraig Brady
5c646eb558 decouple index name generation from sqlalchemy version
In commit 0.7.2-16-gc670d1d the _index_identifier() implementation
was copied from sqlalchemy, as that function was renamed
in sqlalchemy 0.8.  Instead handle call the renamed function
when appropriate, to decouple ourselves from the sqlalchemy
implementation.

Change-Id: I97b22c20d96758fc5b6bd55318218edb26c5b5d0
2013-09-23 15:18:59 +01:00
Josip Delic
c670d1d36a added bugfixes for 0.8 2013-07-11 17:07:04 -04:00
Jan Dittberner
3619347441 drop SQLAlchemy < 0.6 compatibility code 2011-10-28 10:59:10 +02:00
Jan Dittberner
27e24c3374 no special treatment for SQLA 0.7 required in migrate.changeset.ansisql 2011-05-27 12:55:11 +02:00
Jan Dittberner
108f28ae6b remove commented code 2011-05-26 21:56:11 +02:00
Jan Dittberner
1af477e661 fix unit test for adding new columns with foreign keys 2011-05-26 21:43:27 +02:00
Jan Dittberner
a3ae4baa29 use _index_identifier instead of _validate_identifier if
_validate_identifier does not exist in migrate/changeset/ansisql.py

remove executable bits from migrate/tests/fixture/warnings.py
2010-11-09 21:38:17 +01:00
chrisw
adf4113a0b Fix issue 94 - it was impossible to add a column with a non-unique index.
Also implement more functionality with unique and foreign key constrains for sqlite.
2010-09-09 15:38:42 +01:00
iElectric
653e723ce1 move all exception classes to migrate.exceptions 2010-09-07 02:25:29 +02:00
Jan Dittberner
e820261f29 fix unittests
* tested with Python 2.6, SQLAlchemy 0.6.1, PostgreSQL, MySQL and SQLite
2010-07-04 12:33:28 +02:00
iElectric
81f447ef77 SA06 tests fix, thanks to Mike Bayer 2010-05-02 03:03:03 +02:00
iElectric
de3c53989d add support for SA 0.6 by Michael Bayer 2009-06-29 10:18:03 +00:00
iElectric
9f7ab96881 - completely refactored ColumnDelta to extract differences between 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
2009-06-27 14:13:27 +00:00
iElectric
a8c31eb25f adding basic support for firebird, fixes #55 2009-06-22 10:22:06 +00:00
iElectric
17cc5f36e6 finally, tests pass for all supported dialects 2009-06-21 12:51:33 +00:00
iElectric
672d9bd576 some more PEP8 love 2009-06-21 09:17:23 +00:00
iElectric
cde0f9b52d updated changeset tests. whole package is finally PEP8. fixed mysql tests&bugs. updated docs where apropriate. changeset test coverage almost at 100% 2009-06-20 22:33:03 +00:00
iElectric
7eafe744c2 - refactor migrate.changeset;
- 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*
2009-06-16 15:17:33 +00:00
iElectric
cc82a1ad12 update docs, delete obsolete code in constraints 2009-06-12 22:43:02 +00:00
iElectric
8a8b1d2366 use sqlalchemy preparer to do SQL quote formatting. this is a raw change, tests are yet to be written 2009-06-11 22:27:38 +00:00
iElectric
15cb31cea6 lipstick changes 2009-06-10 14:00:53 +00:00
jan.dittberner
d85115c611 add support for ondelete and oncascade to ANSI-SQL foreign key creation
address Issue 48
2009-02-20 18:24:44 +00:00
jan.dittberner
acb2e7bd00 cleanup in migrate.changeset.ansisql and api doc update
remove old commented code in ansisql.py
add some ReST docstrings in ansisql.py
add migrate.changeset.constraint link ins api.rst
2009-01-25 15:00:24 +00:00
jan.dittberner
4806e2c9e1 make migrate.schema.ansisql PEP8 clean and add some sphinx docstrings 2009-01-25 12:51:49 +00:00
jan.dittberner
66c22bcae7 first sphinx docstrings 2009-01-25 12:50:40 +00:00
percious17
cb624f15db support for SA 0.5.1.
Only postgres is working fully.

MySQL has 2 broken tests.

sqlite has about 4 broken tests.
2009-01-19 23:39:53 +00:00
jan.dittberner
979b8b19dc integrate patch for supporting CheckConstraints by srittau.
Fixes Issue #31
needs a test case
2009-01-10 13:11:08 +00:00
percious17
1fa26920d9 fixed bug in create column where foreign keys were being left out. 2008-12-16 23:23:54 +00:00
percious17
2e74b87df5 print statement removal 2008-12-02 15:57:53 +00:00
percious17
9f0bd657f4 most of the tests are now working with nose. 2008-12-02 05:11:36 +00:00
percious17
166a3c230c modified altering of columns to support postgres. 2008-11-27 00:35:12 +00:00
percious17
e4382ab75b missed a postgres identifier quoting on renaming 2008-11-27 00:17:55 +00:00
percious17
c7cbde7fea added hook functions which allow the dialects to specify how to indicate identifiers, as this is different in postgres.
Also, this fix includes a fix for modification of columns which have tables definied within a schema.  This was also broken in postgres.
2008-11-26 22:05:19 +00:00
jan.dittberner
d6d4b511a4 integrate patch for Issue 33 2008-09-16 18:22:18 +00:00
christian.simms
f687cd3fe0 add support for SA 0.5 2008-08-28 01:17:44 +00:00
christian.simms
2ea92c63fe make import of sqlalchemy's SchemaGenerator work regardless of previous imports 2008-02-18 17:03:10 +00:00
jan.dittberner
32aeb8e95e integrated patch by Christian Simms posted at 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
2008-02-14 19:10:47 +00:00
jan.dittberner
2cfe1fc31c moved trunk, branches and tags to project root
fixes Issue #5
2008-02-06 18:39:07 +00:00