删除 ManyToMany 字段无效的 null=True
This commit is contained in:
19
problem/migrations/0004_auto_20150812_2254.py
Normal file
19
problem/migrations/0004_auto_20150812_2254.py
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import models, migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('problem', '0003_auto_20150810_2233'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='problem',
|
||||||
|
name='tags',
|
||||||
|
field=models.ManyToManyField(to='problem.ProblemTag'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -49,4 +49,4 @@ class Problem(AbstractProblem):
|
|||||||
# 难度 0 - n
|
# 难度 0 - n
|
||||||
difficulty = models.IntegerField()
|
difficulty = models.IntegerField()
|
||||||
# 标签
|
# 标签
|
||||||
tags = models.ManyToManyField(ProblemTag, null=True)
|
tags = models.ManyToManyField(ProblemTag)
|
||||||
|
|||||||
Reference in New Issue
Block a user