Tim Graham
7aba69145d
Refs #23919 -- Removed django.test.mock Python 2 compatibility shim.
2017-01-20 08:17:20 -05:00
Andrew Nester
69b7d4b116
Fixed #27458 -- Fixed invalid sequence/index names when using "USER"."TABLE" db_table on Oracle.
2016-12-30 17:11:12 -05:00
Simon Charette
813805833a
Fixed #27631 -- Prevented execution of transactional DDL statements when unsupported.
...
Executing a DDL statement during a transaction on backends that don't support
it silently commits, leaving atomic() in an incoherent state.
While schema_editor.execute() could technically be used to execute DML
statements such usage should be uncommon as these are usually performed through
the ORM. In other cases schema_editor.connection.execute() can be used to
circumvent this check.
Thanks Adam and Tim for the review.
2016-12-28 19:43:32 -05:00
Simon Charette
cd7efa2033
Fixed #25492 -- Checked deferred foreign key constraints before dropping them.
...
This allows running foreign key data and schema altering operations in the
same migration on PostgreSQL.
Thanks Tim for review.
2016-12-24 13:53:11 -05:00
Simon Charette
96181080ba
Refs #26384 -- Isolated a test model in schema tests.
2016-12-23 21:43:49 -05:00
za
321e94fa41
Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.
2016-11-10 21:30:21 -05:00
Tim Graham
414ad25b09
Fixed #27327 -- Simplified time zone handling by requiring pytz.
2016-10-27 08:53:20 -04:00
Claude Paroz
d389125606
Fixed #27098 -- Deprecated DatabaseIntrospection.get_indexes
...
Thanks Akshesh <aksheshdoshi@gmail.com> for help with the PostgreSQL query.
Thanks Tim Graham for the review.
2016-09-12 09:26:33 +02:00
Simon Charette
aca939b6e5
Fixed #27195 -- Stopped dropping default when adding a nullable column.
...
Thanks Rob Golding from Zapier for the report.
2016-09-09 00:48:50 -04:00
Akshesh
6e07ec3f65
Fixed #27030 -- Added contrib.postgres.indexes.GinIndex.
2016-08-12 18:37:03 -04:00
Akshesh
311a8e8d50
Fixed #20888 -- Added support for column order in class-based indexes.
2016-08-12 15:52:16 -04:00
Akshesh
324c1b432a
Fixed #24442 -- Improved SchemaEditor's index name truncation.
2016-08-11 14:36:31 -04:00
Jon Dufresne
2e4cfcd2b9
Fixed #26889 -- Fixed missing PostgreSQL index in SchemaEditor.add_field().
2016-07-13 14:33:54 -07:00
Jon Dufresne
e9e705eedc
Added strict=True to all SchemaEditor.alter_field() calls in tests.
...
It should help catch bugs.
2016-07-08 12:03:33 -04:00
Jon Dufresne
9356f63a99
Fixed #25317 , #26090 -- Fixed swapping combinations of unique and db_index during migrations.
2016-07-07 20:29:08 -04:00
Akshesh
52442898e7
Refs #26709 -- Added 'model' argument to SchemaEditor.add/remove_index()
...
This removes the dependency of the Index class on its model attribute
when a name is passed to it.
Thanks to Markush for discussions.
2016-07-07 10:06:55 -04:00
Jon Dufresne
3410820460
Fixed #26833 -- Fixed SchemaEditor._constraint_names() to handle features.uppercases_column_names.
2016-07-07 08:09:42 -04:00
Jon Dufresne
16614dcd5c
Fixed #25694 -- Removed incorrect _uniq suffix on index names during migrations.
2016-06-29 14:47:29 -04:00
Jon Dufresne
d47f6d75ef
Refs #26034 -- Corrected a schema test to work with the correct field state.
2016-06-27 12:13:15 -04:00
Akshesh
156e2d59cf
Fixed #26709 -- Added class-based indexes.
...
Added the AddIndex and RemoveIndex operations to use them in migrations.
Thanks markush, mjtamlyn, timgraham, and charettes for review and advice.
2016-06-27 10:41:01 -04:00
Simon Charette
c2e62fd1ae
Fixed #26781 -- Made table name case change a noop on SQLite.
...
SQLite disgresses from the SQL standard by ignoring case of quoted identifiers.
Thanks to laozzzi for the report and Tim for the review.
2016-06-21 16:37:06 -04:00
Jon Dufresne
4f336f6652
Fixed #26747 -- Used more specific assertions in the Django test suite.
2016-06-16 14:19:18 -04:00
Iacopo Spalletti
49c57f8565
Fixed #25005 -- Made date and time fields with auto_now/auto_now_add use effective default.
...
Thanks to Andriy Sokolovskiy for initial patch.
2016-05-09 07:48:40 -04:00
Markus Holtermann
deeffde84a
Fixed #26593 -- Leveraged deferrable_sql() in SchemaEditor
2016-05-07 01:21:00 +02:00
Ville Skyttä
575a9a791e
Normalized "an SQL" spelling.
2016-05-03 19:30:48 -04:00
Michal Petrucha
d81d02d449
Refs #26384 , #24995 -- Avoided a module-level MySQL query in the schema tests.
2016-04-02 08:17:35 -04:00
Tim Graham
f3595b2549
Refs #26384 , #24995 -- Skipped a schema test on older MySQL versions.
2016-03-31 12:00:25 -04:00
Alex Hill
4b2cf1cd27
Fixed #26384 -- Fixed renaming the PK on a model with a self-referential FK on SQLite.
2016-03-29 13:25:09 -04:00
Hasan
3d0dcd7f5a
Refs #26022 -- Used context manager version of assertRaises in tests.
2016-01-29 12:32:18 -05:00
Tim Graham
b49cc86643
Fixed #26116 -- Corrected schema's test_alter_implicit_id_to_explicit.
...
AUTOINCREMENT is dropped converting an AutoField to IntegerField
which isn't the point of this test. MySQL would warn or error about
this.
2016-01-22 12:46:27 -05:00
Tim Graham
56aaae58a7
Fixed #26034 -- Fixed incorrect index handling on PostgreSQL on Char/TextField with unique=True and db_index=True.
...
Thanks Simon Charette for review.
2016-01-08 12:47:05 -05:00
Tim Graham
54d3ba8406
Added a helper function in schema tests.
2016-01-08 12:39:06 -05:00
Federico Frenguelli
3a36c80795
Fixed #25412 -- Fixed missing PostgreSQL index on Char/TextField when using AlterField.
...
Thanks to Emanuele Palazzetti for the help.
2015-12-10 16:12:51 -05:00
Simon Charette
64240263f2
Refs #25745 -- Avoided multiple registration of the same model in schema tests.
2015-11-14 11:33:28 -05:00
Tim Graham
4dcc2a1955
Used SchemaEditor.delete_model() for teardown in schema tests.
...
Some third-party database backends (MSSQL) have custom
delete_model() requirements that must be executed.
Thanks Michael Manfre for the initial patch and review.
2015-10-16 08:40:57 -07:00
Simon Charette
8e8c0792c0
Refs #18081 -- Asserted db constraints are created for fk to proxy models.
2015-09-23 14:59:05 -04:00
Ville Skyttä
4d933ad418
Fixed #25393 -- Fixed MySQL crash when adding text/blob field with unhashable default.
2015-09-14 12:25:08 -04:00
Dražen Odobašić
b1e33ceced
Fixed #23395 -- Limited line lengths to 119 characters.
2015-09-12 11:40:50 -04:00
Simon Charette
12f91f6ebd
Used skipUnlessDBFeature where appropriate.
2015-08-08 11:27:06 -04:00
Flavio Curella
c2e70f0265
Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField
2015-07-27 18:28:13 -04:00
Tim Graham
c52822e750
Fixed #25128 -- Fixed SQLite SchemaEditor crash when adding a ForeignObject field.
2015-07-15 15:22:52 -04:00
Simon Charette
bdb382b2a4
Refs #25002 -- Supported textual to temporal column alteration on Oracle.
...
Thanks to Tim Graham for the report and Shai Berger for the review.
2015-06-24 19:37:55 -04:00
Simon Charette
73040e584a
Fixed #25002 -- Used PostgreSQL column type alteration USING clause.
...
Thanks to Dirk Uys for the report.
2015-06-22 09:35:35 -04:00
Adam Brenecki
65296b3be3
Fixed #24972 -- Fixed removing unique_together indexes on MySQL.
2015-06-15 17:28:13 -04:00
Tim Graham
7c637a3aae
Applied db_table conversion to fix schema tests on Oracle.
2015-06-02 19:17:17 -04:00
Tim Graham
e1e6399c2c
Fixed #24893 -- Fixed lack of unique constraint when changing a field from primary_key=True to unique=True
2015-06-02 09:25:47 -04:00
Tim Graham
5ab8680983
Fixed #24892 -- Fixed quoting of SQL when renaming a field to AutoField in PostgreSQL
2015-06-02 09:13:55 -04:00
Adam Chainz
e60cce4e40
Fixed #24846 -- Added support to MySQL SchemaEditor for all blob/text data types
2015-05-30 20:37:57 -04:00
Andriy Sokolovskiy
80ad5472ce
Fixed #24817 -- Prevented loss of null info in MySQL field renaming.
2015-05-28 10:07:52 -04:00
Tim Graham
f5da438072
Fixed #24812 -- Fixed app registry RuntimeWarnings in schema and migrations tests.
2015-05-18 09:48:25 -04:00