From 282412f4baa36b66b8695cb4ee6f57499969a60b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Sun, 18 Mar 2018 15:10:08 +0200 Subject: [PATCH] Allow body to be null for easier db migration. --- ...{0038_auto_20180318_1216.py => 0038_auto_20180318_1306.py} | 4 ++-- hc/api/models.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename hc/api/migrations/{0038_auto_20180318_1216.py => 0038_auto_20180318_1306.py} (80%) diff --git a/hc/api/migrations/0038_auto_20180318_1216.py b/hc/api/migrations/0038_auto_20180318_1306.py similarity index 80% rename from hc/api/migrations/0038_auto_20180318_1216.py rename to hc/api/migrations/0038_auto_20180318_1306.py index bd1ca613..403c545f 100644 --- a/hc/api/migrations/0038_auto_20180318_1216.py +++ b/hc/api/migrations/0038_auto_20180318_1306.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Generated by Django 1.11.6 on 2018-03-18 12:16 +# Generated by Django 1.11.6 on 2018-03-18 13:06 from __future__ import unicode_literals from django.db import migrations, models @@ -20,6 +20,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='ping', name='body', - field=models.CharField(blank=True, max_length=10000), + field=models.CharField(blank=True, max_length=10000, null=True), ), ] diff --git a/hc/api/models.py b/hc/api/models.py index 2d7fce3f..6ee99d6e 100644 --- a/hc/api/models.py +++ b/hc/api/models.py @@ -214,7 +214,7 @@ class Ping(models.Model): remote_addr = models.GenericIPAddressField(blank=True, null=True) method = models.CharField(max_length=10, blank=True) ua = models.CharField(max_length=200, blank=True) - body = models.CharField(max_length=10000, blank=True) + body = models.CharField(max_length=10000, blank=True, null=True) class Channel(models.Model):