generated from 2martens/django-template
Made meal plan name unique per author
This commit is contained in:
19
food_planner/migrations/0008_auto_20200223_1538.py
Normal file
19
food_planner/migrations/0008_auto_20200223_1538.py
Normal file
@ -0,0 +1,19 @@
|
||||
# Generated by Django 3.0.3 on 2020-02-23 14:38
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('food_planner', '0007_mealplan_name'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterUniqueTogether(
|
||||
name='mealplan',
|
||||
unique_together={('author', 'name')},
|
||||
),
|
||||
]
|
||||
@ -306,3 +306,4 @@ class MealPlan(models.Model):
|
||||
class Meta:
|
||||
verbose_name = _('Meal plan')
|
||||
verbose_name_plural = _('Meal plans')
|
||||
unique_together = ['author', 'name']
|
||||
|
||||
Reference in New Issue
Block a user