Commit Graph

42 Commits

Author SHA1 Message Date
David Wobrock a3a1290d47 Refs #27236 -- Moved models with Meta.index_together inside of test methods. 2022-06-03 06:32:11 +02:00
django-bot 9c19aff7c7 Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
Yuekui Li 5e04e84d67 Fixed #32503 -- Fixed altering BLOB/TEXT field to non-nullable with default on MySQL 8.0.13+.
MySQL 8.0.13+ supports defaults for BLOB/TEXT but not in the
ALTER COLUMN statement.

Regression in 6b16c91157.

Thanks Matt Westcott for the report.
2021-05-21 13:34:37 +02:00
Tim Graham e21788121b
Added missing Meta.apps to a schema model. 2020-03-23 06:09:10 +01:00
Paveł Tyślacki 5c17c273ae Refs #30172 -- Prevented removing a model Meta's index/unique_together from removing Meta constraints/indexes. 2019-03-17 20:50:57 -04:00
Paveł Tyślacki 4bb859e246 Refs #30172 -- Prevented removing a field's check or unique constraint from removing Meta constraints. 2019-03-17 20:50:22 -04:00
Mariusz Felisiak 6dd4edb1b4
Fixed #29496 -- Fixed crash on Oracle when converting a non-unique field to primary key.
Thanks Tim Graham for the review.
2018-06-17 08:51:02 +02:00
Mariusz Felisiak 91b2bc3e70 Fixed #27860 -- Dropped varchar_pattern_ops/text_pattern_ops index before altering char/text field in PostgreSQL.
Thanks Tim Graham for the review.
2017-05-24 07:25:59 +02:00
Mariusz Felisiak 538bf43458 Fixed #27859 -- Ignored db_index for TextField/BinaryField on Oracle and MySQL.
Thanks Zubair Alam for the initial patch and Tim Graham for the review.
2017-05-23 17:02:40 +02:00
Markus Holtermann 663e48947f Fixed #28052 -- Prevented dropping Meta.indexes when changing db_index to False.
Thanks Marc Tamlyn for the report and Ian Foote/Tim Graham for review.
2017-05-01 11:31:48 -04:00
Claude Paroz f3c43ad1fd Refs #23919 -- Removed python_2_unicode_compatible decorator usage 2017-01-18 13:44:34 +01:00
Simon Charette 96181080ba Refs #26384 -- Isolated a test model in schema tests. 2016-12-23 21:43:49 -05:00
Jon Dufresne 16614dcd5c Fixed #25694 -- Removed incorrect _uniq suffix on index names during migrations. 2016-06-29 14:47:29 -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
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
Adam Brenecki 65296b3be3 Fixed #24972 -- Fixed removing unique_together indexes on MySQL. 2015-06-15 17:28:13 -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
Andriy Sokolovskiy 80ad5472ce Fixed #24817 -- Prevented loss of null info in MySQL field renaming. 2015-05-28 10:07:52 -04:00
Claude Paroz f54c0ec06e Fixed #24658 -- Added missing Meta attribute in schema tests
Without that, the Note model would be initially created and then
the tests using that model failed when run in isolation.
2015-04-19 00:05:58 +02:00
Markus Holtermann 0204714b0b Cleaned up schema tests
Thanks Tim Graham for the review.
2015-02-05 20:11:48 +01:00
Markus Holtermann 5792e6a88c Fixed #24163 -- Removed unique constraint after index on MySQL
Thanks Łukasz Harasimowicz for the report.
2015-01-19 16:52:26 +01:00
Tim Graham 765fa36d57 Fixed #23920 -- Fixed MySQL crash when adding blank=True to TextField.
Thanks wkornewald for the report and Markus Holtermann for review.
2014-12-04 10:57:10 -05:00
Markus Holtermann 715ccfde24 Fixed #23738 -- Allowed migrating from NULL to NOT NULL with the same default value
Thanks to Andrey Antukh for the report.
2014-10-31 13:30:30 -04:00
Andrew Godwin 27b6f28435 Fixed #23264: Schema backends honour db_constraint 2014-08-09 17:50:00 +10:00
Andrew Godwin 7dacc6ae46 Fixed #23009: Shorten FK identifiers in add_field and make consistent 2014-07-21 10:50:21 +01:00
Andrew Godwin b25aee3b7b Fixed #22476: Couldn't alter attributes on M2Ms with through= set 2014-05-08 10:34:24 -07:00
Andrew Godwin 6b07804474 Fixed #22183: Through M2Ms now correctly handled 2014-03-08 15:58:04 -08:00
Ramiro Morales 3518e9ec1f Amend test table name so it doesn't clash.
Refs #21692 and 3efd1b8b93.
2013-12-27 21:02:39 -03:00
Ramiro Morales 3efd1b8b93 Fixed #21692 -- Quote table name when creating it. 2013-12-27 18:43:52 -03:00
Aymeric Augustin 1716b7ce5a Renamed AppCache to Apps.
Also renamed app_cache to apps and "app cache" to "app registry".

Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
2013-12-24 12:25:17 +01:00
Aymeric Augustin 2fef9e5375 Moved apps back in the toplevel django namespace.
Reverted 4a56a93cc4.
2013-12-22 11:39:55 +01:00
Aymeric Augustin 0242c56fd8 Deborgified the app cache.
Improved Andrew's hack to create temporary app caches to handle
migrations. Now the main app cache has a "master" flag set to True
(which is a non-default keyword argument, thus unlikely to be used by
mistake). Other app cache instances have "master" set to False.

The only sanctioned way to access the app cache is by importing
django.core.apps.app_cache.

If you were instanciating an app cache and relying on the Borg pattern,
you'll have to refactor your code.
2013-12-17 21:53:18 +01:00
Aymeric Augustin 4a56a93cc4 Moved the new app cache inside core. 2013-12-17 10:17:46 +01:00
Aymeric Augustin 860c2c8bc5 Moved django.db.models.loading to django.apps.cache.
This commit doesn't contain any code changes; it's purely a refactoring.
2013-12-17 10:17:43 +01:00
Joel Bohman 19e5cd77f0 Fixed #21497 -- Forced conversion to bytes for very long index names 2013-11-24 13:15:50 -05:00
Tim Graham 3db66b1d65 Updated syncdb -> migrate in tests. 2013-09-03 11:51:34 -04:00
Andrew Godwin 52edc16086 Add more stringent M2M tests and fix the bug they exposed 2013-08-19 13:50:26 +01:00
Andrew Godwin ae19315b4d Support index_together during model creation 2013-08-11 14:23:31 +01:00
Andrew Godwin 104ad0504b Split out a BaseAppCache, make AppCache borg again, add _meta.app_cache 2013-05-09 15:16:43 +01:00
Andrew Godwin 7f3678dc4c Merge branch 'master' into schema-alteration
Conflicts:
	django/db/backends/__init__.py
	django/db/backends/mysql/base.py
	django/db/backends/oracle/base.py
	django/db/backends/oracle/creation.py
	django/db/backends/postgresql_psycopg2/base.py
	django/db/backends/sqlite3/base.py
	django/db/models/fields/related.py
2013-04-18 17:16:39 +01:00