color should be up to 32 characters, fix color migration
This commit is contained in:
parent
20abfe5ad5
commit
8731fd5f11
3 changed files with 27 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
|||
# Generated by Django 1.11.2 on 2017-07-13 10:31
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
def convert_stuffed_area_to_location_group(apps, schema_editor):
|
||||
|
@ -24,6 +24,11 @@ class Migration(migrations.Migration):
|
|||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='locationgroup',
|
||||
name='color',
|
||||
field=models.CharField(blank=True, max_length=32, null=True, verbose_name='background color'),
|
||||
),
|
||||
migrations.RunPython(convert_stuffed_area_to_location_group),
|
||||
migrations.RemoveField(
|
||||
model_name='area',
|
||||
|
|
20
src/c3nav/mapdata/migrations/0035_auto_20170916_1216.py
Normal file
20
src/c3nav/mapdata/migrations/0035_auto_20170916_1216.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.2 on 2017-09-16 12:16
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('mapdata', '0034_auto_20170807_1523'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='locationgroup',
|
||||
name='color',
|
||||
field=models.CharField(blank=True, max_length=32, null=True, verbose_name='background color'),
|
||||
),
|
||||
]
|
|
@ -183,7 +183,7 @@ class LocationGroup(Location, models.Model):
|
|||
category = models.ForeignKey(LocationGroupCategory, related_name='groups', on_delete=models.PROTECT,
|
||||
verbose_name=_('Category'))
|
||||
priority = models.IntegerField(default=0, db_index=True)
|
||||
color = models.CharField(null=True, blank=True, max_length=16, verbose_name=_('background color'))
|
||||
color = models.CharField(null=True, blank=True, max_length=32, verbose_name=_('background color'))
|
||||
|
||||
objects = LocationGroupManager()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue