mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #22487: Separated schema migration from data migration in test
The data migration failed on Oracle, killing the entire test suite. Thanks timo for reporting the Oracle breakage, and andrewgodwin for suggesting the solution.
This commit is contained in:
@@ -4,14 +4,6 @@ from __future__ import unicode_literals
|
||||
from django.db import models, 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 = [
|
||||
@@ -28,7 +20,4 @@ class Migration(migrations.Migration):
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
migrations.RunPython(
|
||||
add_book,
|
||||
),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user