Skip to content

Commit

Permalink
Increase the max_length of CodeType.code & NameType.code
Browse files Browse the repository at this point in the history
This is because the name of the 'local-authority-eng' is longer
than the previous 10 characters allowed.
  • Loading branch information
symroe committed Dec 5, 2016
1 parent 4ce7027 commit 4357e30
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
25 changes: 25 additions & 0 deletions mapit/migrations/0003_auto_20161205_1050.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-12-05 14:19
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('mapit', '0002_auto_20141218_1615'),
]

operations = [
migrations.AlterField(
model_name='codetype',
name='code',
field=models.CharField(help_text="A unique code, eg 'ons' or 'unit_id'", max_length=500, unique=True),
),
migrations.AlterField(
model_name='nametype',
name='code',
field=models.CharField(help_text="A unique code to identify this type of name: eg 'english' or 'iso'", max_length=500, unique=True),
),
]
4 changes: 2 additions & 2 deletions mapit/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ class NameType(models.Model):
# and displayed in the alternative names section.

code = models.CharField(
max_length=10, unique=True, help_text="A unique code to identify this type of name: eg 'english' or 'iso'")
max_length=500, unique=True, help_text="A unique code to identify this type of name: eg 'english' or 'iso'")
description = models.CharField(
max_length=200, blank=True, help_text="The name of this type of name, eg 'English' or 'ISO Standard'")
objects = models.Manager()
Expand Down Expand Up @@ -386,7 +386,7 @@ class CodeType(models.Model):
# This could be extended to a more generic data store of information on an
# object, perhaps.

code = models.CharField(max_length=10, unique=True, help_text="A unique code, eg 'ons' or 'unit_id'")
code = models.CharField(max_length=500, unique=True, help_text="A unique code, eg 'ons' or 'unit_id'")
description = models.CharField(
max_length=200, blank=True,
help_text="The name of the code, eg 'Office of National Statitics' or 'Ordnance Survey ID'")
Expand Down

0 comments on commit 4357e30

Please sign in to comment.