From fc0e67950b8e5dd2aa12e87aad5ca2d9f110a95a Mon Sep 17 00:00:00 2001 From: Chase Thompson-Baugh Date: Tue, 11 Aug 2015 09:53:51 -0600 Subject: [PATCH 1/2] Adjust to MySQL max when using "unique=True" --- server/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/models.py b/server/models.py index 855894a0..cdea78c7 100644 --- a/server/models.py +++ b/server/models.py @@ -239,7 +239,7 @@ class Meta: unique_together = ("machine", "update") class Plugin(models.Model): - name = models.CharField(max_length=256, unique=True) + name = models.CharField(max_length=255, unique=True) order = models.IntegerField() def __unicode__(self): return self.name From 47792400449405f30b72890a5cffbfa34b0297d0 Mon Sep 17 00:00:00 2001 From: Chase Thompson-Baugh Date: Tue, 11 Aug 2015 10:05:25 -0600 Subject: [PATCH 2/2] New migration for MySQL length change --- server/migrations/0008_auto_20150811_1001.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 server/migrations/0008_auto_20150811_1001.py diff --git a/server/migrations/0008_auto_20150811_1001.py b/server/migrations/0008_auto_20150811_1001.py new file mode 100644 index 00000000..435a7695 --- /dev/null +++ b/server/migrations/0008_auto_20150811_1001.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('server', '0007_auto_20150811_0813'), + ] + + operations = [ + migrations.AlterField( + model_name='plugin', + name='name', + field=models.CharField(unique=True, max_length=255), + ), + ] \ No newline at end of file