summaryrefslogtreecommitdiff
path: root/django/db/backends
AgeCommit message (Collapse)Author
2012-09-07Removed many uses of bare "except:", which were either going to a) silence ↵Alex Gaynor
real issues, or b) were impossible to hit.
2012-09-07Add M2M repointingAndrew Godwin
2012-09-07Ensued that SQL indexes are alwasy created in the same name.Alex Gaynor
Previous this used Python's builtin hash() function, which has never been guarnteed to be stable across implementations (CPython/Jython/etc.) or 32/64 bitness. However, this in practice it was stable. However, with the impending release of Python 3.3 hash randomizations is enabled by default, which would mean the index name changed between program invocations.
2012-09-07Repoint ForeignKeys when their to= changes.Andrew Godwin
2012-09-07Added SQLite backend which passes all current testsAndrew Godwin
2012-09-05Merge branch 'master' into schema-alterationAndrew Godwin
2012-09-04Implement primary key changingAndrew Godwin
2012-08-30db_index alteration mostly workingAndrew Godwin
2012-08-30Made get_table_description also return the size of char fields on SQLiteClaude Paroz
2012-08-30Fixed #5725 -- Fixed varchar column size introspection for MySQLClaude Paroz
Thanks ferdonline for the initial patch and Karen Tracey for the related post on django-users.
2012-08-30Replaced some smart_xxx by force_xxx equivalentClaude Paroz
smart_str/smart_text should only be used when a potential lazy string should be preserved in the result of the function call.
2012-08-29Replaced many smart_bytes by force_bytesClaude Paroz
In all those occurrences, we didn't care about preserving the lazy status of the strings, but we really wanted to obtain a real bytestring.
2012-08-23[py3] Removed duplicate imports.Aymeric Augustin
Fixed #18837. Refs #18791.
2012-08-20[py3] Prepared MySQL backend for Python 3 compatibilityClaude Paroz
2012-08-19[py3] Fixed Oracle specific failuresAnssi Kääriäinen
2012-08-18[py3] Ported django.utils.safestring.Aymeric Augustin
Backwards compatibility aliases were created under Python 2.
2012-08-18Add a SQlite backend. One test passes!Andrew Godwin
2012-08-18All tests passing on MySQLAndrew Godwin
2012-08-18First stab at MySQL supportAndrew Godwin
2012-08-18[py3] Fixed backends tests.Aymeric Augustin
2012-08-18[py3] Added compatibility import of thread/_threadAymeric Augustin
This commit fixes the auto-reload of the development server. I should have done that change in ca07fda2.
2012-08-16[py3] Fixed installed_models filtering.Dmitry Shevchenko
2012-08-15[py3] Pass bytes to md5 in truncate_nameClaude Paroz
2012-08-14[py3] Removed unnecessary calls to .keys()Aymeric Augustin
when computing the length of a dictionary. This fails on Python 3.
2012-08-13Refix #13844 -- Made FloatField aggregates work on Python 2.6 + PostgresAnssi Kääriäinen
Fixed a regression introduced in 59a655988ee95e4b4e4646cebea88b620d8fcdd2.
2012-08-12Fixed #13844 -- Avoid converting unknown db values to floatAnssi Kääriäinen
This patch removes an unconditional float(value) conversion from db backend default convert_values() method. This can cause problems when aggregating over character fields for example. In addition, Oracle and SQLite already return the bare value from their convert_values(). In the long term the converting should be done by fields, and the fields should then call database backend specific converters when needed. The current setup is inflexible for 3rd party fields. Thanks to Merlijn van Deen for the original patch.
2012-08-12[py3] Always convert values from sqlite3 to unicode stringsClaude Paroz
Thanks Aymeric Augustin for the review.
2012-08-10Add db_table and db_tablespace handlingAndrew Godwin
2012-08-10Merge branch 'master' into schema-alterationAndrew Godwin
2012-08-10Add support for unique_togetherAndrew Godwin
2012-08-09[py3] Renamed `next` to `__next__` in iterators.Aymeric Augustin
See PEP 3114. `next` is retained as an alias for Python 2.
2012-08-08[py3] Replaced raw_input by inputClaude Paroz
The six addition has been borrowed from: https://bitbucket.org/gutworth/six/changeset/733ef740
2012-08-07[py3] Ported django.utils.encoding.Aymeric Augustin
* Renamed smart_unicode to smart_text (but kept the old name under Python 2 for backwards compatibility). * Renamed smart_str to smart_bytes. * Re-introduced smart_str as an alias for smart_text under Python 3 and smart_bytes under Python 2 (which is backwards compatible). Thus smart_str always returns a str objects. * Used the new smart_str in a few places where both Python 2 and 3 want a str.
2012-08-07[py3] Fixed access to dict keys/values/items.Aymeric Augustin
2012-08-03Replaced some byte strings by str() callsClaude Paroz
This is a useful trick when Python 2 awaits byte strings and Python 3 Unicode (regular) strings.
2012-08-02Add M2M tests and some unique supportAndrew Godwin
2012-07-26Merge branch 'master' of github.com:django/django into schema-alterationAndrew Godwin
Conflicts: django/db/backends/postgresql_psycopg2/base.py
2012-07-24Fixed #18271 -- Changed stage at which TransactionTestCase flushes DB tables.Ramiro Morales
Previously, the flush was done before the test case execution and now it is performed after it. Other changes to the testing infrastructure include: * TransactionTestCase now doesn't reset autoincrement sequences either (previous behavior can achieved by using `reset_sequences`.) With this, no implicit such reset is performed by any of the provided TestCase classes. * New ordering of test cases: All unittest tes cases are run first and doctests are run at the end. THse changes could be backward-incompatible with test cases that relied on some kind of state being preserved between tests. Please read the relevant sections of the release notes and testing documentation for further details. Thanks Andreas Pelme for the initial patch. Karen Tracey and Anssi Kääriäinen for the feedback and Anssi for reviewing. This also fixes #12408.
2012-07-22[py3] Switched to Python 3-compatible imports.Aymeric Augustin
xrange/range will be dealt with in a separate commit due to the huge number of changes.
2012-07-22[py3] Replaced unicode/str by six.text_type/bytes.Aymeric Augustin
2012-07-22[py3] Replaced basestring by six.string_types.Aymeric Augustin
2012-07-22[py3] Removed longs.Aymeric Augustin
2012-07-22[py3] Exception aren't iterable in Python 3.Aymeric Augustin
2012-07-22[py3] Used six.reraise wherever necessary.Aymeric Augustin
2012-07-17Fixed #17788 -- Added batch_size argument to qs.bulk_create()Anssi Kääriäinen
The qs.bulk_create() method did not work with large batches together with SQLite3. This commit adds a way to split the bulk into smaller batches. The default batch size is unlimited except for SQLite3 where the batch size is limited to 999 SQL parameters per batch. Thanks to everybody who participated in the discussions at Trac.
2012-07-10Fixed #18602 -- Improved error message when database NAME is missingClaude Paroz
Thanks Kristian Glass for the report.
2012-07-05Fixed #18330 - Made cache culling 3rd party db backend friendlyAnssi Kääriäinen
This is Ian Kelly's patch from #15580 with minor modifications.
2012-07-01Fixed #16047 -- Restore autocommit state correctly on psycopg2Anssi Kääriäinen
When the postgresql_psycopg2 backend was used with DB-level autocommit mode enabled, after entering transaction management and then leaving it, the isolation level was never set back to autocommit mode. Thanks brodie for report and working on this issue.
2012-07-01Fixed some locations to work with autocommit=TrueAnssi Kääriäinen
- backends: supports_transactions() - select_for_update tests
2012-06-26Fixed #18465 -- Set date formats correctly on OracleJosh Smeaton
Correctly configure NLS_SESSION_PARAMETERS to format Date and DateTime on Oracle backend. Thanks to Josh Smeaton for report & patch.