Add tests for the makemigrations override
This commit is contained in:
1 parent
34a6d9d47e
commit
c2c26ae106
11 files changed
+273
No files matched your search
Whitespace-only changes.
@@ -0,0 +1,5 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class MakemigrationsBackwardIncompatibleMigrationMissingConfig(AppConfig):
|
||||
name = "tests.test_project.makemigrations_backward_incompatible_migration_missing"
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 2.2 on 2020-06-26 17:49
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = []
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="A",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.AutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
("x", models.IntegerField()),
|
||||
],
|
||||
),
|
||||
]
|
||||
Whitespace-only changes.
@@ -0,0 +1,6 @@
|
||||
from django.db import models
|
||||
|
||||
|
||||
class A(models.Model):
|
||||
x = models.IntegerField()
|
||||
new_field = models.CharField(null=False, default="empty", max_length=255)
|
||||
Whitespace-only changes.
@@ -0,0 +1,5 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class MakemigrationsCorrectMigrationMissingConfig(AppConfig):
|
||||
name = "tests.test_project.makemigrations_correct_migration_missing"
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 2.2 on 2020-06-26 15:57
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = []
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="A",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.AutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
("x", models.IntegerField()),
|
||||
],
|
||||
),
|
||||
]
|
||||
Whitespace-only changes.
@@ -0,0 +1,6 @@
|
||||
from django.db import models
|
||||
|
||||
|
||||
class A(models.Model):
|
||||
x = models.IntegerField()
|
||||
new_field = models.CharField(null=True, max_length=255)
|
||||
Reference in new issue
Block a user