Aymeric Augustin
ec186572e6
Removed global timezone-aware datetime converters.
...
Refs #23820 .
2015-05-17 09:36:23 +02:00
Claude Paroz
3226050358
Fixed #24791 -- Added fallback when 'postgres' database isn't available
...
Thanks Carl Meyer and Tim Graham for the reviews.
2015-05-15 18:44:20 +02:00
Claude Paroz
ae635cc365
Fixed #24757 -- Recreated MySQL index when needed during combined index removal
...
Thanks Thomas Recouvreux for the report and Tim Graham for the tests and
review.
2015-05-15 17:07:14 +02:00
Milan Broum
95058606c8
Allowed using the sqlite3 backend as much as possible without _sqlite3.
...
The inner import was dropped during the reorganizing of the database
backends in commit 28308078f3
.
2015-05-04 12:59:59 -04:00
Tim Graham
2d76b61dc2
Fixed #24649 -- Allowed using Avg aggregate on non-numeric field types.
2015-04-25 13:06:14 -04:00
Tim Graham
26996e2d55
Fixed #24499 -- Dropped support for PostGIS 1.5.
2015-04-25 12:21:16 -04:00
Claude Paroz
8097e54832
Fixed #23879 -- Allowed model migration skip based on feature/vendor
...
Thanks Carl Meyer for the report and review, and Tim Graham for the
review.
2015-04-18 15:17:49 +02:00
Claude Paroz
02260ea3f6
Fixed #24595 -- Prevented loss of null info in MySQL field alteration
...
Thanks Simon Percivall for the report, and Simon Charette and Tim
Graham for the reviews.
2015-04-17 10:25:15 +02:00
peterfarrell
f8e8853b51
Fixed #24637 -- Fixed database introspection with SQLite 3.8.9.
2015-04-14 11:29:59 -04:00
Jon Dufresne
2cf58e80d1
Fixed #24584 -- Fixed microsecond handling with older MySQLdb
2015-04-06 22:43:51 +02:00
Alex Hill
07ba148d9e
Cleaned up use of context manager in SQLite schema editor
2015-04-03 09:13:55 -04:00
Andriy Sokolovskiy
29b4a3f513
Removed duplicate attribute in MySQL DatabaseSchemaEditor.
2015-03-30 19:23:41 -04:00
Simon Charette
dc27f3ee0c
Fixed #19259 -- Added group by selected primary keys support.
2015-03-29 22:03:30 -04:00
Andrei Kulakov
e2bfcab065
Fixed #24394 -- Allowed running tests with empty default dictionary.
2015-03-25 17:56:59 -04:00
Anssi Kääriäinen
8f30556329
Renamed Field.rel attribute to remote_field
...
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-25 08:16:12 -04:00
Tim Graham
13bc311cdb
Removed getLogger alias in django.utils.log.
2015-03-24 08:41:05 -04:00
Claude Paroz
01ec127bae
Fixed #12400 -- Allowed geometry fields in unique_together
...
Thanks Tim Graham for the review.
2015-03-23 19:52:49 +01:00
Alex Hill
880393a902
Explicitly disable FK constraints in SQLite editor
2015-03-21 10:31:07 +01:00
Alex Hill
6c58e53d5d
Safer table alterations under SQLite
...
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-21 10:31:07 +01:00
Jean-Louis Fuchs
f4f0060fea
Fixed #24447 -- Made migrations add FK constraints for existing columns
...
When altering from e.g. an IntegerField to a ForeignKey, Django didn't
add a constraint.
2015-03-07 14:09:56 +01:00
Tim Graham
4e8b167e4d
Fixed MySQL build failure introduced by refs #24390 .
...
Added table_name back to _create_index_sql() to prevent
duplicate index names on MySQL.
2015-03-02 13:07:34 -05:00
László Károlyi
f37c11eea3
Fixed #24390 -- Made migration index names deterministic.
2015-03-02 09:25:19 -05:00
Michael Manfre
7fa7dd48c4
Fixed signature of BaseDatabaseOperations.date_interval_sql() and document the change.
2015-02-22 23:23:16 -05:00
Loic Bistuer
bed504d70b
Fixed #24351 , #24346 -- Changed the signature of allow_migrate().
...
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-20 21:34:09 +07:00
Marc Tamlyn
32d4db66b9
Update converters to take a consistent set of parameters.
...
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-20 11:35:52 +00:00
Shai Berger
ceadc94f09
Fixed #24307 : Avoided redundant column nullability modifications on Oracle
...
Thanks Joris Benschop for the report, and Tim Graham for the tests.
2015-02-19 02:39:41 +02:00
Adam Chainz
e9282747a4
Removed unused foreign_key_re variables in MySQL/Oracle DB backends
2015-02-18 10:22:30 -05:00
Tim Graham
63c5c98701
Refs #24324 -- Fixed UnicodeEncodeError in SQLite backend while testing.
...
If 'name' contained non-ASCII characters, the comparison raised a
UnicodeEncodeError on Python 2.
2015-02-17 08:09:46 -05:00
Tim Graham
3adc5f1ee6
Fixed #24335 -- Bumped required psycopg2 version to 2.4.5 (2.5 for contrib.postgres).
2015-02-16 18:07:27 -05:00
Aymeric Augustin
a73c8540a8
Removed 'autocommit' options for the psycopg2 backend.
...
It was documented as not having any effect since Django 1.6.
2015-02-14 18:51:18 +01:00
Aymeric Augustin
28e97a9bdc
Cleaned up init_connection_state in the psycopg2 backend.
...
settings_dict['TIME_ZONE'] is set in ConnectionHandler.ensure_defaults.
2015-02-14 18:51:18 +01:00
Aymeric Augustin
76356d963c
Fixed #24318 -- Set the transaction isolation level with psycopg >= 2.4.2.
2015-02-14 18:51:11 +01:00
Josh Smeaton
e2d6e14662
Refs #14030 -- Improved expression support for python values
2015-02-12 08:46:25 +11:00
Josh Smeaton
1fbe8a2de3
Fixed #24200 -- Made introspection bypass statement cache
2015-02-10 23:24:34 +02:00
Loic Bistuer
c8e24bbc9b
Fixed isort import that's inconsistent between platforms.
2015-02-11 02:24:14 +07:00
я котик пур-пур
981bd64dfb
Unified local imports in django.db.backends.mysql.
2015-02-09 08:23:17 -05:00
Collin Anderson
db77915c9f
Fixed E265 comment style
2015-02-06 09:30:35 -05:00
Tim Graham
0ed7d15563
Sorted imports with isort; refs #23860 .
2015-02-06 08:16:28 -05:00
Tim Graham
75303b01a9
Fixed #24245 -- Added introspection for database defaults.
...
Needed for tests for migrations handling of database defaults.
2015-01-31 12:33:11 -05:00
Tim Graham
64a899dc81
Removed PostgreSQL DatabaseWrapper._set_isolation_level().
...
This method is unused since 8717b0668c
.
2015-01-31 11:05:26 -05:00
Tim Graham
29c0073335
Fixed #24164 -- Fixed Oracle GIS limited aggregation test failure.
2015-01-30 06:28:47 -05:00
Tim Graham
18f3e79b13
Removed threading fallback imports.
...
Django imports threading in many other places without fallback.
2015-01-28 10:23:25 -05:00
Josh Smeaton
8196e4bdf4
Fixed #24154 -- Backends can now check support for expressions
2015-01-27 12:20:06 +11:00
Andriy Sokolovskiy
38c17871bb
Fixed #24104 -- Fixed check to look on field.many_to_many instead of class instance
2015-01-22 18:41:19 +01:00
Adam Taylor
039465a6a7
Fixed typos in code comments.
2015-01-20 12:18:03 -05: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
2b039d966f
Removed obsolete SQL generation methods.
2015-01-18 15:58:06 -05:00
Tim Graham
7e8cf74dc7
Removed support for syncing apps without migrations per deprecation timeline.
...
Kept support for creating models without migrations when running tests
(especially for Django's test suite).
2015-01-18 15:58:06 -05:00
Tim Graham
3b570dbcdb
Removed BaseDatabaseValidation.validate_field() per deprecation timeline.
2015-01-17 14:58:09 -05:00
Tim Graham
b845951fd4
Required sqlparse for SQL splitting per deprecation timeline.
2015-01-17 10:20:30 -05:00
Tim Graham
4aa089a9a9
Removed support for custom SQL per deprecation timeline.
2015-01-17 10:16:06 -05:00
Tim Graham
f6463bb380
Removed the syncdb command per deprecation timeline.
2015-01-17 09:20:12 -05:00
Tim Graham
9ce36512fa
Removed backwards compatibility shims for "util" modules per deprecation timeline.
...
refs #17627 .
2015-01-17 07:40:12 -05:00
Marc Tamlyn
39d95fb6ad
Fixed #24092 -- Widened base field support for ArrayField.
...
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-16 16:15:16 -05:00
Claude Paroz
67bcae1e58
Moved check_aggregate_support to BaseSpatialOperations
2015-01-14 22:03:41 +01:00
Tim Graham
28308078f3
Fixed #22603 -- Reorganized classes in django.db.backends.
2015-01-14 14:16:20 -05:00
Michał Modzelewski
65246de7b1
Fixed #24031 -- Added CASE expressions to the ORM.
2015-01-12 18:15:34 -05:00
Shai Berger
aa8ee6a573
Fixed test failures in Oracle introspection
...
Refs #17785
2015-01-13 01:00:09 +02:00
Josh Smeaton
21b858cb67
Fixed #24060 -- Added OrderBy Expressions
2015-01-13 09:39:55 +11:00
Claude Paroz
4c413e231c
Fixed #17785 -- Preferred column names in get_relations introspection
...
Thanks Thomas Güttler for the report and the initial patch, and
Tim Graham for the review.
2015-01-12 19:58:47 +01:00
Claude Paroz
68a439a18d
Removed supports_binary_field flag as all backends support them
...
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-11 23:34:47 +01:00
Claude Paroz
7289d01973
Introspected alternate SQLite FK definitions
2015-01-10 16:51:14 +01:00
Anssi Kääriäinen
0c7633178f
Fixed #24020 -- Refactored SQL compiler to use expressions
...
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.
2015-01-08 14:07:54 -05:00
Daniel Pyrathon
fb48eb0581
Fixed #12663 -- Formalized the Model._meta API for retrieving fields.
...
Thanks to Russell Keith-Magee for mentoring this Google Summer of
Code 2014 project and everyone else who helped with the patch!
2015-01-06 19:25:12 -05:00
Tim Graham
478d6a9503
Copied BaseDatabaseCreation._digest() to SchemaEditor to remove dependency.
...
refs #22340 .
2014-12-31 08:33:34 -05:00
Tim Graham
93d73dac91
Moved DatabaseCreation.data_types properties to DatabaseWrapper.
...
refs #22340 .
2014-12-31 08:29:17 -05:00
Tim Graham
8082c75d18
Removed db.backends methods which only call super().
2014-12-30 11:53:59 -05:00
Andriy Sokolovskiy
8c99b7920e
Fixed #12118 -- Added shared cache support to SQLite in-memory testing.
2014-12-30 10:14:33 -05:00
Tim Graham
ab4f709da4
Fixed #23581 -- Prevented extraneous DROP DEFAULT statements.
...
Thanks john_scott for the report and Markus Holtermann for review.
2014-12-30 07:54:05 -05:00
Claude Paroz
3c5d1edb39
Fixed #22279 -- Prevented dummy backend going through DatabaseErrorWrapper
...
Thanks Daniel Hahler for the report and Tim Graham for the review.
2014-12-29 19:06:28 +01:00
Claude Paroz
2ceb10f3b0
Fixed #14180 -- Prevented unneeded index creation on MySQL-InnoDB
...
Thanks zimnyx for the report and Simon Charette, Tim Graham for
the reviews.
2014-12-27 12:52:44 +01:00
Josh Smeaton
4718296546
Fixed #23753 -- Added a suite of SQL Functions
...
Added functions and tests
Added docs and more tests
Added TextField converter to mysql backend
Aliased Value as V in example docs and tests
Removed unicode_compatible in example
Fixed console emulation in examples
2014-12-27 15:27:27 +11:00
Claude Paroz
30cbd5d360
Replaced DatabaseCreation sql methods by schema editor equivalents
...
Also used schema editor in migrate to sync unmigrated apps (sync_apps).
Refs #22340 . Thanks Tim Graham for the review.
2014-12-23 19:35:01 +01:00
Anssi Kääriäinen
227a4c48be
Refs #2443 -- fixed format_dtdelta on SQLite
...
A test failed on Python 2 32-bit.
2014-12-23 07:05:44 -05:00
Marc Tamlyn
962bb9b6bd
Refs #2443 -- Move the durationfield converter logic.
...
This reduces how frequently this logic is run significantly.
Thanks to Anssi for the suggestion.
2014-12-23 10:41:42 +00:00
Marc Tamlyn
5ca82e710e
Fixed #24033 -- Use interval type on Oracle.
...
Use INTERVAL DAY(9) TO SECOND(6) for Durationfield on Oracle rather than
storing as a NUMBER(19) of microseconds.
There are issues with cx_Oracle which require some extra data
manipulation in the database backend when constructing queries, but it
handles the conversion back to timedelta objects cleanly.
Thanks to Shai for the review.
2014-12-23 10:38:32 +00:00
Marc Tamlyn
07728a2c2c
Refs #2443 -- Fix Oracle tests for DurationField.
...
It helps if there are the correct number of microseconds in a second.
2014-12-20 22:04:07 +00:00
Marc Tamlyn
57554442fe
Fixed #2443 -- Added DurationField.
...
A field for storing periods of time - modeled in Python by timedelta. It
is stored in the native interval data type on PostgreSQL and as a bigint
of microseconds on other backends.
Also includes significant changes to the internals of time related maths
in expressions, including the removal of DateModifierNode.
Thanks to Tim and Josh in particular for reviews.
2014-12-20 18:28:29 +00:00
Andriy Sokolovskiy
089047331d
Fixed #23987 -- Made SQLite SchemaEditor always use effective_default().
2014-12-15 13:40:24 -05:00
Shai Berger
7c1f3901bc
Fixed #23991 -- Apparently, Oracle doesn't need the decimal field converter
...
Thanks Josh Smeaton for review.
2014-12-15 00:07:10 +02:00
Claude Paroz
df30ae07fc
Fixed postgis test database initialization
...
Refs #20968 . Allow querying template_postgis presence without
existing test database.
Thanks Tim Graham for the review.
2014-12-12 20:08:07 +01:00
Josh Smeaton
267a1dcd9b
Fixed #23941 -- Removed implicit decimal formatting from expressions.
2014-12-12 10:17:48 -05:00
Claude Paroz
8f97413fae
Fixed #20968 -- Checked Spatialite metadata before migrations
...
Thanks Kenial S. Lee for the initial patch and Tim Graham for
the review.
2014-12-08 22:22:53 +01:00
Jon Dufresne
4468c08d70
Fixed #23968 -- Replaced list comprehension with generators and dict comprehension
2014-12-08 07:58:23 -05:00
Claude Paroz
8d7a48027e
Fixed #23954 -- Added special text/varchar PostgreSQL indexes in migrations
...
Thanks adityagupta104 for the report and Tim Graham for the review.
2014-12-04 21:27:42 +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
Andriy Sokolovskiy
1739ae9edc
Fixed #23807 -- Ignored non-digits in psycopg2 version
2014-12-01 18:42:08 -05:00
Claude Paroz
e11c6fd218
Fixed #23909 -- Prevented crash when collecting SQL for RunSQL
...
Thanks James Rivett-Carnac for the report and Markus Holtermann
for the review.
2014-12-01 20:26:40 +01:00
Markus Holtermann
d2202ec2d4
Fixed #23880 -- Added missing index_together handling for SQLite
2014-12-01 11:30:33 +07:00
Thomas Chaumeny
6b5d82749c
Fixed #16731 -- Made pattern lookups work properly with F() expressions
2014-11-28 12:50:42 +02:00
Anssi Kääriäinen
cbb5cdd155
Fixed #23867 -- removed DateQuerySet hacks
...
The .dates() queries were implemented by using custom Query, QuerySet,
and Compiler classes. Instead implement them by using expressions and
database converters APIs.
2014-11-26 17:49:25 -05:00
Collin Anderson
d4ea4eea79
Fixed #23889 -- Added more usage of quote_name_unless_alias() to avoid deprecation warnings.
2014-11-21 16:44:50 -05:00
Brad Walker
cfa26f29bd
Reduced reduce() usage; refs #23796 .
...
django.core.exceptions.ValidationError.messages() and
django.db.backends.schema.BaseDatabaseSchemaEditor._alter_field():
Replaced reduce(operator.add, ...) w/uncoupled, explicit sum()
2014-11-20 14:31:14 -05:00
Claude Paroz
1a63093e22
Added AutoField introspection for PostgreSQL
...
Refs #23748 .
2014-11-20 16:13:58 +01:00
Claude Paroz
11662022be
Added AutoField introspection for MySQL
...
Refs #23748 .
2014-11-20 16:13:58 +01:00
Tim Graham
5bcd292098
Fixed #23871 -- Removed promotion of MySQL warnings to errors in DEBUG mode.
2014-11-19 16:07:49 -05:00
Josh Smeaton
f59fd15c49
Fixed #14030 -- Allowed annotations to accept all expressions
2014-11-15 14:00:43 +00:00
Thomas Chaumeny
88b2a20f04
Simplified MySQL storage engine detection using INFORMATION_SCHEMA.ENGINES table
...
Query the table introduced in MySQL 5.1; refs #23144 .
2014-11-10 18:16:14 +01: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
Claude Paroz
713f23492a
Required MySQLdb >= 1.2.5 for fractional seconds support
...
On MySQLdb < 1.2.5, MySQLdb returns None when fetching datetime/time
values with fractional seconds.
See https://github.com/farcepest/MySQLdb1/issues/24
2014-10-28 15:06:58 +01:00
Claude Paroz
22da5f8817
Fixed #19716 -- Added support for microseconds with MySQL 5.6.4 and up
...
Thanks erik@cederstrand.dk for the report and Tim Graham for the review.
2014-10-28 15:06:58 +01:00
Claude Paroz
9e746c13e8
Stopped stripping microseconds with MySQL backend
...
Refs #19716 .
2014-10-28 15:06:57 +01:00
Claude Paroz
5b8e37a69e
Fixed typo in MySQL backend doctring
...
Thanks CHI Cheng for the report.
2014-10-27 14:01:12 +01:00
Mikhail Denisenko
d4bc0bf435
Fixed #22879 -- Intercept errors coming from cursor.__next__()
2014-10-27 14:51:40 +02:00
Claude Paroz
7f089ac2e3
Fixed #23446 -- Officially recommended mysqlclient as MySQL driver
...
Thanks Corey Farwell for the report and Tim Graham for the review.
Thanks also to Inada Naoki for creating and maintaining mysqlclient.
2014-10-27 09:11:33 +01:00
Claude Paroz
45db842c9b
Fixed #23652 -- Restored database name after destroying test database
...
Thanks Bjarkias for the report.
2014-10-24 17:04:43 +02:00
Tim Graham
92269b7b53
Fixed #23702 -- Fixed adding an explicit id field on SQLite.
...
Thanks gavinwahl for the report.
2014-10-23 12:24:34 -04:00
Shai Berger
2e1ed5f33c
Fixed #23649 -- Made Oracle test-db creation drop test-user earlier when needed
...
Checked database destruction for ORA-29857, which happens when objects of
some types are left over in an old test database (notably, such objects
are created by the GIS backend). When this happens, we can resolve the
issue by dropping the test-user (if we are allowed to).
An alternative approach, to just switch the order of creation (so that,
if the test user exists and can be dropped, it is always dropped before
the tablespace) was considered; but since the user creation depends on
the tablespace, this would necessitate separating the dropping of the user
from its creation -- a change I am reluctant to make.
Thanks Josh Smeaton and Tim Graham for reviews.
2014-10-17 04:46:15 +03:00
Collin Anderson
a6a8268d19
Fixed #23660 -- Moved sort_dependencies to core.
2014-10-16 03:04:13 +07:00
Markus Holtermann
f633ba778d
Fixed #23609 -- Fixed IntegrityError that prevented altering a NULL column into a NOT NULL one due to existing rows
...
Thanks to Simon Charette, Loic Bistuer and Tim Graham for the review.
2014-10-09 21:32:06 +07:00
Thomas Chaumeny
b2aad7b836
Replaced set([foo, ...]) by {foo, ...} literals. Refs PR 3282.
...
Thanks Collin Anderson for the review.
2014-09-29 00:01:38 +07:00
Shai Berger
a54adcecff
Fixed git blunder, refs #22738
2014-09-27 09:57:09 +03:00
Shai Berger
c1ae0621ba
Fixed #22738 -- made finer distinctions for when Boolean is not detected on Oracle
...
Thanks Claude Paroz for partial fix and Simon Charrette for review
2014-09-27 09:49:50 +03:00
Claude Paroz
dbdae3a755
Fixed #22738 -- Abstracted boolean field type introspection
...
Thanks maxi for the report, Shai Berger for his help with the patch
and Tim Graham for the review.
2014-09-26 20:03:44 +02:00
Claude Paroz
d1ca70110f
Factorized schema_editor() at BaseDatabaseWrapper level
2014-09-26 08:50:16 +02:00
Tim Graham
74e7f91e6d
Fixed #23538 -- Added SchemaEditor for MySQL GIS.
...
Thanks Claude Paroz for suggestions and review.
2014-09-25 13:53:44 -04:00
Tim Graham
0aca91cf7f
Fixed flake8 warnings.
2014-09-24 06:32:42 -04:00
Shai Berger
d128eac316
Changed Oracle test-user creation to grant privileges instead of roles
...
because the roles (specifically RESOURCE) are deprecated.
Also added optional support for creating views in tests, and made an
introspection test fail (rather than skip) if a view cannot be created
due to lacking privileges.
Refs #18782
Thanks Tim Graham for review, and Josh Smeaton
2014-09-24 04:58:33 +03:00
Claude Paroz
ed297061a6
Fixed #18782 -- Prevented sql_flush to flush views
...
Thanks rodolfo_3 for the report and the initial patch, and
Josh Smeaton, Shai Berger and Tim Graham for the reviews.
2014-09-23 20:13:31 +02:00
Claude Paroz
b8cdc7dcc3
Made get_table_list return a TableInfo named tuple
2014-09-23 20:13:31 +02:00
Sergey Fedoseev
463952d940
Fixed #23503 -- Fixed renaming of model with self-referential m2m field.
2014-09-23 10:03:37 -04:00
Sergey Fedoseev
83cd18633f
Fixed #23065 -- Quoted constraint names in SQL generated by migrations.
2014-09-23 09:25:31 -04:00
Sergey Fedoseev
0bea6c8749
Factored create_fk_sql, create_unique_sql, and delete_constraint_sql.
2014-09-23 09:24:32 -04:00
Josh Smeaton
0eb5cde9da
Fixed #21775 -- Allowed customization of datafile for Oracle tablespace
2014-09-17 09:55:33 -04:00
Marc Tamlyn
ed7821231b
Fixed #19463 -- Added UUIDField
...
Uses native support in postgres, and char(32) on other backends.
2014-09-16 10:08:09 +01:00
Claude Paroz
6072f17d09
Factorized create_index_sql expression
2014-09-13 21:34:37 +02:00
Josh Smeaton
638d1393ee
Fixed #23434 -- Coerce Oracle bool params to int
2014-09-08 10:11:20 -04:00
Marc Tamlyn
14c8456ffe
Fixed #23416 -- Make sure DatabaseCreation respects checks.
...
Migrations respected Field.db_parameters()['check'], but
DatabaseCreation was still using just Field.db_type().
2014-09-06 19:01:06 +01:00
Tim Graham
1101467ce0
Limited lines to 119 characters in django/
...
refs #23395 .
2014-09-05 09:22:16 -04:00
Marc Tamlyn
e9103402c0
Fixed #18757 , #14462 , #21565 -- Reworked database-python type conversions
...
Complete rework of translating data values from database
Deprecation of SubfieldBase, removal of resolve_columns and
convert_values in favour of a more general converter based approach and
public API Field.from_db_value(). Now works seamlessly with aggregation,
.values() and raw queries.
Thanks to akaariai in particular for extensive advice and inspiration,
also to shaib, manfre and timograham for their reviews.
2014-09-03 20:36:03 +01:00
Jon Dufresne
f0d3dd4f04
Fixed #23357 -- Added small int introspection support to MySQL backend.
...
In the MySQL backend, updated the can_introspect_small_integer feature
flag to True. In data_types_reverse, map FIELD_TYPE.SHORT to a
SmallIntegerField. Added test to verify introspecting SmallIntegerFields
and fixed existing tests influenced by this change.
2014-08-27 10:58:44 -04:00
Shai Berger
4c85a0d95f
Made main user disconnect after creating test user/tablespaces on Oracle
2014-08-25 20:20:10 +03:00
Shai Berger
a6222af0ed
Added docstring forgotten in 56252e7
.
2014-08-22 05:37:36 +03:00
Shai Berger
56252e7f46
Fixed schema test for Oracle 11.2.0.1 which is used in Django Project's CI.
...
Refs #23073 Workaround.
Refs #22738 Repeats the mysql "offense". When the issue is solved, the
Oracle special case should be made to play with the solution (that is,
Oracle should be fixed the same way that mysql and the 3rd-party backneds
are).
2014-08-22 05:08:53 +03:00
Claude Paroz
6295ea0027
Replaced HAS_SPATIAL_DB by testing database feature
...
Refs #22632 . This should be the base for using more database
features to exclude specific backends in GIS tests.
Thanks Tim Graham for the review.
2014-08-19 17:57:01 +02:00
zsoldosp
01801edd37
Fixed #22646 : Added support for the MySQL ssl-ca option to dbshell.
2014-08-13 18:29:42 -04:00
Florian Apolloner
61d783f3d7
Made sqlite's remove_field behave like the base backend.
2014-08-10 13:31:06 +02:00
Claude Paroz
dc462a8ed5
Removed unused migrate option
2014-08-09 17:13:00 +02:00
Andrew Godwin
27b6f28435
Fixed #23264 : Schema backends honour db_constraint
2014-08-09 17:50:00 +10:00
Andrew Godwin
8d93b21ec9
Moved index dropping after FK dropping to please MySQL and fix test
2014-08-07 11:59:11 +10:00
Alex Hill
938da36cb1
Fixed #21603 -- Fixed complex RawQuerySets queries on some versions of SQLite.
2014-08-06 08:41:34 -04:00
Shai Berger
746f2a4bed
Fixed #23061 : Avoided setting a limit on a query for get with select_for_update on Oracle
...
Thanks Michael Miller for reporting the issue.
2014-08-05 03:12:08 +03:00
Mihail Milushev
bf5382c6e5
Fixed #22234 -- Replaced OS-specific code with subprocess.call() in dbshell.
...
This fixes escaping of special characters on Windows.
2014-08-04 09:21:03 -04:00
Andrew Godwin
c06e124b5e
Fixed #23091 : CreateModel and AddField were clashing with deferred SQL
2014-08-04 11:59:29 +10:00
Tim Graham
d28396f526
Fixed #23144 -- Dropped support for MySQL 5.0, 5.1.
2014-08-02 10:28:40 -04:00
Tim Graham
8f9d6e83a0
Fixed #23145 -- Dropped support for Oracle < 11.1
2014-08-01 19:32:00 -04:00
Tim Graham
a9bdce7e55
Fixed #23108 -- Dropped support for PostgreSQL 8.4 & PostGIS 1.3, 1.4.
...
Thanks Claude Paroz for the review.
2014-08-01 10:26:00 -04:00
Aymeric Augustin
729e4ae4f0
Fixed #23074 -- Avoided leaking savepoints in atomic.
...
Thanks Chow Loong Jin for the report and the initial patch.
2014-07-28 14:30:41 +02:00
areski
90faa196f6
Fixed #22873 -- Renamed use_debug_cursor to force_debug_cursor to clarify the behavior.
2014-07-26 10:38:46 -04:00
Andrew Godwin
08681d7757
Fixed #23085 : Better error message for PostGIS 1.5/bad custom fields
2014-07-25 09:49:51 -07:00