From 4863c9f448c466bd705f6e2a0791e8990aa67a10 Mon Sep 17 00:00:00 2001 From: LongHairedHacker Date: Fri, 26 May 2017 01:57:52 +0200 Subject: [PATCH] Added missing defaults --- roms/migrations/0010_auto_20170526_0155.py | 20 ++++++++++++++++++++ roms/models.py | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 roms/migrations/0010_auto_20170526_0155.py diff --git a/roms/migrations/0010_auto_20170526_0155.py b/roms/migrations/0010_auto_20170526_0155.py new file mode 100644 index 0000000..2bdd76d --- /dev/null +++ b/roms/migrations/0010_auto_20170526_0155.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.5 on 2017-05-25 23:55 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('roms', '0009_rom_download_count'), + ] + + operations = [ + migrations.AlterField( + model_name='rom', + name='download_count', + field=models.IntegerField(default=0), + ), + ] diff --git a/roms/models.py b/roms/models.py index 1fcb6f5..e3947c6 100644 --- a/roms/models.py +++ b/roms/models.py @@ -33,7 +33,7 @@ class Rom(models.Model): approved = models.BooleanField("approved", default=False) tags = TaggableManager(blank = True) user = models.ForeignKey(User, blank=True, null=True) - download_count = models.IntegerField() + download_count = models.IntegerField(default = 0) creation_time = models.DateTimeField("creation time", auto_now_add = True) edit_time = models.DateTimeField("edit time", auto_now = True)