fixed migrations to work around transaction limitations of SQLite

This commit is contained in:
Jenny Danzmayr 2018-10-31 21:34:06 +01:00
parent c79d87166b
commit 7a896073e4
2 changed files with 8 additions and 0 deletions

View file

@ -2,6 +2,7 @@
# Generated by Django 1.11.2 on 2017-06-11 12:06
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
@ -79,3 +80,6 @@ class Migration(migrations.Migration):
to='mapdata.Level', verbose_name='level'),
),
]
# workaround as transactions are not supported on SQLite because they would break referential integrity
atomic = settings.DATABASES['default']['ENGINE'] != 'django.db.backends.sqlite3'

View file

@ -2,6 +2,7 @@
# Generated by Django 1.11.2 on 2017-07-08 14:23
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
@ -41,3 +42,6 @@ class Migration(migrations.Migration):
to='mapdata.Space', verbose_name='space'),
),
]
# workaround as transactions are not supported on SQLite because they would break referential integrity
atomic = settings.DATABASES['default']['ENGINE'] != 'django.db.backends.sqlite3'