* cc: ckarrie@… (added)
* version: 1.1 => SVN
Comment:
Same in Postgis 2.0
--
Ticket URL: <https://code.djangoproject.com/ticket/12400#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Design decision needed => Accepted
Comment:
If this isn't fixed, it should at least be documented.
--
Ticket URL: <https://code.djangoproject.com/ticket/12400#comment:8>
* owner: jbronn => claudep
* status: new => assigned
* has_patch: 0 => 1
Comment:
https://github.com/django/django/pull/4361
--
Ticket URL: <https://code.djangoproject.com/ticket/12400#comment:9>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/12400#comment:10>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"01ec127baec38b7f8281e6eca9def40f22c9e5ad" 01ec127b]:
{{{
#!CommitTicketReference repository=""
revision="01ec127baec38b7f8281e6eca9def40f22c9e5ad"
Fixed #12400 -- Allowed geometry fields in unique_together
Thanks Tim Graham for the review.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/12400#comment:11>
* status: closed => new
* has_patch: 1 => 0
* resolution: fixed =>
* stage: Ready for checkin => Accepted
Comment:
Crash on Oracle after this change:
{{{
Traceback (most recent call last):
File "./runtests.py", line 434, in <module>
options.debug_sql)
File "./runtests.py", line 256, in django_tests
extra_tests=extra_tests,
File "/home/jenkins/workspace/django-
oracle/database/oragis11/label/trusty/python/python2.7/django/test/runner.py",
line 210, in run_tests
old_config = self.setup_databases()
File "/home/jenkins/workspace/django-
oracle/database/oragis11/label/trusty/python/python2.7/django/test/runner.py",
line 166, in setup_databases
**kwargs
File "/home/jenkins/workspace/django-
oracle/database/oragis11/label/trusty/python/python2.7/django/test/runner.py",
line 370, in setup_databases
serialize=connection.settings_dict.get("TEST", {}).get("SERIALIZE",
True),
File "/home/jenkins/workspace/django-
oracle/database/oragis11/label/trusty/python/python2.7/django/db/backends/base/creation.py",
line 71, in create_test_db
run_syncdb=True,
File "/home/jenkins/workspace/django-
oracle/database/oragis11/label/trusty/python/python2.7/django/core/management/__init__.py",
line 118, in call_command
return command.execute(*args, **defaults)
File "/home/jenkins/workspace/django-
oracle/database/oragis11/label/trusty/python/python2.7/django/core/management/base.py",
line 398, in execute
output = self.handle(*args, **options)
File "/home/jenkins/workspace/django-
oracle/database/oragis11/label/trusty/python/python2.7/django/core/management/commands/migrate.py",
line 168, in handle
self.sync_apps(connection, executor.loader.unmigrated_apps)
File "/home/jenkins/workspace/django-
oracle/database/oragis11/label/trusty/python/python2.7/django/core/management/commands/migrate.py",
line 288, in sync_apps
cursor.execute(statement)
File "/home/jenkins/workspace/django-
oracle/database/oragis11/label/trusty/python/python2.7/django/db/backends/utils.py",
line 64, in execute
return self.cursor.execute(sql, params)
File "/home/jenkins/workspace/django-
oracle/database/oragis11/label/trusty/python/python2.7/django/db/utils.py",
line 95, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/jenkins/workspace/django-
oracle/database/oragis11/label/trusty/python/python2.7/django/db/backends/utils.py",
line 62, in execute
return self.cursor.execute(sql)
File "/home/jenkins/workspace/django-
oracle/database/oragis11/label/trusty/python/python2.7/django/db/backends/oracle/base.py",
line 478, in execute
return self.cursor.execute(query, self._param_generator(params))
django.db.utils.DatabaseError: ORA-02329: column of datatype ADT cannot be
unique or a primary key
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/12400#comment:12>
Comment (by claudep):
Does that mean that Oracle doesn't support unique indexes on geometry
fields? If that's the case, we'll probably need a new database feature.
Then the difficulty will be to conditionally create the index during
tests. As usual, I'm not able to work on Oracle fixes, but I'm available
to discuss/help.
More generally, being able to skip some model import or creation depending
on the backend would be useful for other tests too (gis, postgres, etc.).
--
Ticket URL: <https://code.djangoproject.com/ticket/12400#comment:13>
* keywords: => 1.9
--
Ticket URL: <https://code.djangoproject.com/ticket/12400#comment:14>
Comment (by jtiai):
Yes, Oracle doesn't support unique index on geometry fields so this must
be resolved so that models and tests are skipped on Oracle by some means.
--
Ticket URL: <https://code.djangoproject.com/ticket/12400#comment:15>
Comment (by akaariai):
Could you make the unique index definition conditional on used database,
and the skip the tests that require the index by normal means?
Alternatively you can make the model definition conditional on db, but
that requires conditional imports, too.
--
Ticket URL: <https://code.djangoproject.com/ticket/12400#comment:16>
* stage: Accepted => Ready for checkin
Comment:
[https://github.com/django/django/pull/5160 Pull request] looks good
(pending some cosmetic edits).
--
Ticket URL: <https://code.djangoproject.com/ticket/12400#comment:17>
Comment (by Tim Graham <timograham@…>):
In [changeset:"1b8d7eff3bb1de1f0b51137d720d6fcf7622bced" 1b8d7eff]:
{{{
#!CommitTicketReference repository=""
revision="1b8d7eff3bb1de1f0b51137d720d6fcf7622bced"
Refs #12400 -- Added supports_geometry_field_unique_index GIS db feature.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/12400#comment:18>
* status: new => closed
* resolution: => fixed
--
Ticket URL: <https://code.djangoproject.com/ticket/12400#comment:19>