10 | | |
11 | | Changes made after Django [source:/django/tags/releases/0.95 0.95]: |
12 | | * [3512] August 2, 2006: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Databaseconstraintnameschanged Database constraint names changed] |
13 | | * [3552] August 11, 2006: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Backslashescapingchanged Backslash escaping changed] |
14 | | * [3877] September 27, 2006: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#RemovedENABLE_PSYCOsetting Removed ENABLE_PSYCO setting] |
15 | | * [4724] + [4767] March 14, 2007: [http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#EnforcingMySQLdbversion Enforcing MySQLdb version] |
79 | | == Database constraint names changed == |
80 | | |
81 | | As of [3512], the format of the constraint names Django generates for foreign key references changed slightly. These names are only used sometimes, when it is not possible to put the reference directly on the affected column, so this is not always visible. |
82 | | |
83 | | The effect of this change is that {{{manage.py reset app_name}}} and similar commands may generate SQL with invalid constraint names and thus generate an error when run against the database (the database server will complain about the constraint not existing). To fix this, you will need to tweak the output of {{{manage.py sqlreset app_name}}} to match the correct constraint names and pass the results to the database server manually. |
84 | | |
85 | | == Backslash escaping changed == |
86 | | |
87 | | As of [3552], the Django database API now escapes backslashes given as query parameters. If you have any database API code that match backslashes, and it was working before (despite the broken escaping), you'll have to change your code to "unescape" the slashes one level. |
88 | | |
89 | | For example, this used to work: |
90 | | |
91 | | {{{ |
92 | | #!python |
93 | | # Code that matches a single backslash |
94 | | MyModel.objects.filter(text__contains='\\\\') |
95 | | }}} |
96 | | |
97 | | But it should be rewritten as this: |
98 | | |
99 | | {{{ |
100 | | #!python |
101 | | # Code that matches a single backslash |
102 | | MyModel.objects.filter(text__contains='\\') |
103 | | }}} |
104 | | |
105 | | == Removed ENABLE_PSYCO setting == |
106 | | |
107 | | As of [3877], the {{{ENABLE_PSYCO}}} setting no longer exists. If your settings file includes {{{ENABLE_PSYCO}}}, nothing will break per se, but it just won't do anything. If you want to use [http://psyco.sourceforge.net/ Psyco] with Django, write some [wiki:PsycoMiddleware custom middleware that activates Psyco]. |
108 | | |
109 | | == Enforcing MySQLdb version == |
110 | | |
111 | | As of [4724], Django raises an error if you try to use the MySQL backend with a {{{MySQLdb}}} (MySQL Python module) version earlier than 1.2.1p2. There were significant, production-related bugs in earlier versions, so we have upgraded the minimum requirement. |
112 | | |
113 | | In [4767], we added a {{{mysql_old}}} backend, which is identical to the {{{mysql}}} backend prior to the change in [4724]. You can use this backend if upgrading the {{{MySQLdb}}} module is not immediately possible. However, the {{{mysql_old}}} backend is deprecated, and we will not continue developing it. |