mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-10 08:14:53 +00:00
Fix initial migrations on project template for sqlite, as per #60
This commit is contained in:
parent
03700d65ed
commit
ae7ca004d2
1 changed files with 5 additions and 1 deletions
|
|
@ -4,7 +4,8 @@ from __future__ import unicode_literals
|
|||
from south.utils import datetime_utils as datetime
|
||||
from south.db import db
|
||||
from south.v2 import DataMigration
|
||||
from django.db import models
|
||||
from django.db import models, connection
|
||||
from django.db.transaction import set_autocommit
|
||||
|
||||
|
||||
class Migration(DataMigration):
|
||||
|
|
@ -14,6 +15,9 @@ class Migration(DataMigration):
|
|||
)
|
||||
|
||||
def forwards(self, orm):
|
||||
if connection.vendor == 'sqlite':
|
||||
set_autocommit(True)
|
||||
|
||||
orm['wagtailcore.Page'].objects.get(id=2).delete()
|
||||
|
||||
homepage_content_type, created = orm['contenttypes.contenttype'].objects.get_or_create(
|
||||
|
|
|
|||
Loading…
Reference in a new issue