The data migration failed on Oracle, killing the entire test suite. Thanks timo for reporting the Oracle breakage, and andrewgodwin for suggesting the solution. Backport of 64d94cf from master
24 lines
507 B
Python
24 lines
507 B
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import migrations
|
|
|
|
|
|
def add_book(apps, schema_editor):
|
|
apps.get_model("migration_test_data_persistence", "Book").objects.using(
|
|
schema_editor.connection.alias,
|
|
).create(
|
|
title="I Love Django",
|
|
)
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [("migration_test_data_persistence", "0001_initial")]
|
|
|
|
operations = [
|
|
migrations.RunPython(
|
|
add_book,
|
|
),
|
|
]
|