summaryrefslogtreecommitdiff
path: root/django/db/backends
AgeCommit message (Collapse)Author
2015-03-25Fixed #24394 -- Allowed running tests with empty default dictionary.Andrei Kulakov
2015-03-25Renamed Field.rel attribute to remote_fieldAnssi Kääriäinen
Field.rel is now deprecated. Rel objects have now also remote_field attribute. This means that self == self.remote_field.remote_field. In addition, made the Rel objects a bit more like Field objects. Still, marked ManyToManyFields as null=True.
2015-03-24Removed getLogger alias in django.utils.log.Tim Graham
2015-03-23Fixed #12400 -- Allowed geometry fields in unique_togetherClaude Paroz
Thanks Tim Graham for the review.
2015-03-21Explicitly disable FK constraints in SQLite editorAlex Hill
2015-03-21Safer table alterations under SQLiteAlex Hill
Table alterations in SQLite require creating a new table and copying data over from the old one. This change ensures that no Django model ever exists with the temporary table name as its db_table attribute.
2015-03-07Fixed #24447 -- Made migrations add FK constraints for existing columnsJean-Louis Fuchs
When altering from e.g. an IntegerField to a ForeignKey, Django didn't add a constraint.
2015-03-02Fixed MySQL build failure introduced by refs #24390.Tim Graham
Added table_name back to _create_index_sql() to prevent duplicate index names on MySQL.
2015-03-02Fixed #24390 -- Made migration index names deterministic.László Károlyi
2015-02-22Fixed signature of BaseDatabaseOperations.date_interval_sql() and document ↵Michael Manfre
the change.
2015-02-20Fixed #24351, #24346 -- Changed the signature of allow_migrate().Loic Bistuer
The new signature enables better support for routing RunPython and RunSQL operations, especially w.r.t. reusable and third-party apps. This commit also takes advantage of the deprecation cycle for the old signature to remove the backward incompatibility introduced in #22583; RunPython and RunSQL won't call allow_migrate() when when the router has the old signature. Thanks Aymeric Augustin and Tim Graham for helping shape up the patch. Refs 22583.
2015-02-20Update converters to take a consistent set of parameters.Marc Tamlyn
As suggested by Anssi. This has the slightly strange side effect of passing the expression to Expression.convert_value has the expression passed back to it, but it allows more complex patterns of expressions.
2015-02-19Fixed #24307: Avoided redundant column nullability modifications on OracleShai Berger
Thanks Joris Benschop for the report, and Tim Graham for the tests.
2015-02-18Removed unused foreign_key_re variables in MySQL/Oracle DB backendsAdam Chainz
2015-02-17Refs #24324 -- Fixed UnicodeEncodeError in SQLite backend while testing.Tim Graham
If 'name' contained non-ASCII characters, the comparison raised a UnicodeEncodeError on Python 2.
2015-02-16Fixed #24335 -- Bumped required psycopg2 version to 2.4.5 (2.5 for ↵Tim Graham
contrib.postgres).
2015-02-14Removed 'autocommit' options for the psycopg2 backend.Aymeric Augustin
It was documented as not having any effect since Django 1.6.
2015-02-14Cleaned up init_connection_state in the psycopg2 backend.Aymeric Augustin
settings_dict['TIME_ZONE'] is set in ConnectionHandler.ensure_defaults.
2015-02-14Fixed #24318 -- Set the transaction isolation level with psycopg >= 2.4.2.Aymeric Augustin
2015-02-12Refs #14030 -- Improved expression support for python valuesJosh Smeaton
2015-02-10Fixed #24200 -- Made introspection bypass statement cacheJosh Smeaton
2015-02-11Fixed isort import that's inconsistent between platforms.Loic Bistuer
2015-02-09Unified local imports in django.db.backends.mysql.я котик пур-пур
2015-02-06Fixed E265 comment styleCollin Anderson
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-31Fixed #24245 -- Added introspection for database defaults.Tim Graham
Needed for tests for migrations handling of database defaults.
2015-01-31Removed PostgreSQL DatabaseWrapper._set_isolation_level().Tim Graham
This method is unused since 8717b0668caf00ec5e81ef5a1e31b4d7c64eee8a.
2015-01-30Fixed #24164 -- Fixed Oracle GIS limited aggregation test failure.Tim Graham
2015-01-28Removed threading fallback imports.Tim Graham
Django imports threading in many other places without fallback.
2015-01-27Fixed #24154 -- Backends can now check support for expressionsJosh Smeaton
2015-01-22Fixed #24104 -- Fixed check to look on field.many_to_many instead of class ↵Andriy Sokolovskiy
instance
2015-01-20Fixed typos in code comments.Adam Taylor
2015-01-19Fixed #24163 -- Removed unique constraint after index on MySQLMarkus Holtermann
Thanks Łukasz Harasimowicz for the report.
2015-01-18Removed obsolete SQL generation methods.Tim Graham
2015-01-18Removed support for syncing apps without migrations per deprecation timeline.Tim Graham
Kept support for creating models without migrations when running tests (especially for Django's test suite).
2015-01-17Removed BaseDatabaseValidation.validate_field() per deprecation timeline.Tim Graham
2015-01-17Required sqlparse for SQL splitting per deprecation timeline.Tim Graham
2015-01-17Removed support for custom SQL per deprecation timeline.Tim Graham
2015-01-17Removed the syncdb command per deprecation timeline.Tim Graham
2015-01-17Removed backwards compatibility shims for "util" modules per deprecation ↵Tim Graham
timeline. refs #17627.
2015-01-16Fixed #24092 -- Widened base field support for ArrayField.Marc Tamlyn
Several issues resolved here, following from a report that a base_field of GenericIpAddressField was failing. We were using get_prep_value instead of get_db_prep_value in ArrayField which was bypassing any extra modifications to the value being made in the base field's get_db_prep_value. Changing this broke datetime support, so the postgres backend has gained the relevant operation methods to send dates/times/datetimes directly to the db backend instead of casting them to strings. Similarly, a new database feature has been added allowing the uuid to be passed directly to the backend, as we do with timedeltas. On the other side, psycopg2 expects an Inet() instance for IP address fields, so we add a value_to_db_ipaddress method to wrap the strings on postgres. We also have to manually add a database adapter to psycopg2, as we do not wish to use the built in adapter which would turn everything into Inet() instances. Thanks to smclenithan for the report.
2015-01-14Moved check_aggregate_support to BaseSpatialOperationsClaude Paroz
2015-01-14Fixed #22603 -- Reorganized classes in django.db.backends.Tim Graham
2015-01-12Fixed #24031 -- Added CASE expressions to the ORM.Michał Modzelewski
2015-01-13Fixed test failures in Oracle introspectionShai Berger
Refs #17785
2015-01-13Fixed #24060 -- Added OrderBy ExpressionsJosh Smeaton
2015-01-12Fixed #17785 -- Preferred column names in get_relations introspectionClaude Paroz
Thanks Thomas Güttler for the report and the initial patch, and Tim Graham for the review.
2015-01-11Removed supports_binary_field flag as all backends support themClaude Paroz
It was mainly for MySQL on Python 3, but now the current recommended MySQL driver for Python 3 (mysqlclient) does support binary fields, it is unneeded. Refs #20377.
2015-01-10Introspected alternate SQLite FK definitionsClaude Paroz
2015-01-08Fixed #24020 -- Refactored SQL compiler to use expressionsAnssi Kääriäinen
Refactored compiler SELECT, GROUP BY and ORDER BY generation. While there, also refactored select_related() implementation (get_cached_row() and get_klass_info() are now gone!). Made get_db_converters() method work on expressions instead of internal_type. This allows the backend converters to target specific expressions if need be. Added query.context, this can be used to set per-query state. Also changed the signature of database converters. They now accept context as an argument.