From 213052255919b07beb25ec3556acfa8074c42303 Mon Sep 17 00:00:00 2001 From: Griatch Date: Wed, 18 Nov 2015 00:11:33 +0100 Subject: [PATCH] Added a check to deactivate AlterIndexTogether if the Oracle database is used. This should, according to #732 fix the migration issue with Oracle, but have no database to check with. So supposedly resolves #732. --- evennia/typeclasses/migrations/0001_initial.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/evennia/typeclasses/migrations/0001_initial.py b/evennia/typeclasses/migrations/0001_initial.py index cb26a7449..55b1daa7c 100644 --- a/evennia/typeclasses/migrations/0001_initial.py +++ b/evennia/typeclasses/migrations/0001_initial.py @@ -2,6 +2,7 @@ from __future__ import unicode_literals from django.db import models, migrations +from django.conf import settings import evennia.utils.picklefield @@ -53,3 +54,8 @@ class Migration(migrations.Migration): index_together=set([('db_key', 'db_category', 'db_tagtype')]), ), ] + # if we are using Oracle, we need to remove the AlterIndexTogether operation + # since Oracle seems to create its own index already at AlterUniqueTogether, meaning + # there is a conflict (see issue #732). + if settings.DATABASES['default']['ENGINE'] == "django.db.backends.oracle": + del operations[3]