migrations: mark slug as unique from the start (#20937)

This commit is contained in:
Frédéric Péters 2018-01-11 08:50:46 +01:00
parent 27e4003531
commit ebfd5c7e09
2 changed files with 20 additions and 1 deletions

View File

@ -16,7 +16,7 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('title', models.CharField(max_length=50, verbose_name='Title')),
('slug', models.SlugField(verbose_name='Identifier', db_index=False)),
('slug', models.SlugField(verbose_name='Identifier', unique=True)),
('description', models.TextField(verbose_name='Description')),
('log_level', models.CharField(default=b'INFO', max_length=10, verbose_name='Log Level', choices=[(b'NOTSET', b'NOTSET'), (b'DEBUG', b'DEBUG'), (b'INFO', b'INFO'), (b'WARNING', b'WARNING'), (b'ERROR', b'ERROR'), (b'CRITICAL', b'CRITICAL'), (b'FATAL', b'FATAL')])),
('service_url', models.CharField(help_text='Gateway Web Service URL', max_length=128, verbose_name='Service URL')),

View File

@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('passerelle_imio_liege_rn', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='imioliegern',
name='slug',
field=models.SlugField(unique=True),
),
]