add testcase for DROP NOT NULL
This commit is contained in:
1 parent
cb5d3991ee
commit
5e2c7bbfaf
12 files changed
+69
No files matched your search
Whitespace-only changes.
@@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
@@ -0,0 +1,5 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class AppAddNotNullColumnConfig(AppConfig):
|
||||
name = "app_alter_column_drop_not_null"
|
||||
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 2.1.4 on 2019-03-19 20:59
|
||||
|
||||
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",
|
||||
),
|
||||
),
|
||||
("not_null_field", models.IntegerField(null=False)),
|
||||
],
|
||||
)
|
||||
]
|
||||
@@ -0,0 +1,16 @@
|
||||
# Generated by Django 2.1.4 on 2019-03-19 21:05
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [("app_alter_column_drop_not_null", "0001_create_table")]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='a',
|
||||
name='not_null_field',
|
||||
field=models.IntegerField(null=True),
|
||||
),
|
||||
]
|
||||
Whitespace-only changes.
@@ -0,0 +1,5 @@
|
||||
from django.db import models
|
||||
|
||||
|
||||
class A(models.Model):
|
||||
not_null_field = models.IntegerField(null=True)
|
||||
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
@@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
@@ -43,6 +43,7 @@ INSTALLED_APPS = [
|
||||
"tests.test_project.app_add_not_null_column",
|
||||
"tests.test_project.app_add_not_null_column_followed_by_default",
|
||||
"tests.test_project.app_alter_column",
|
||||
"tests.test_project.app_alter_column_drop_not_null",
|
||||
"tests.test_project.app_correct",
|
||||
"tests.test_project.app_create_table_with_not_null_column",
|
||||
"tests.test_project.app_drop_column",
|
||||
|
||||
Reference in new issue
Block a user