From e29ea230fbaf393f4a091848bcae9d007c0283c0 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Thu, 21 Apr 2016 07:23:14 +0100 Subject: [PATCH 1/2] Add migration for Document.documentproperties ref This should have been included with a8dcbbb, which changed the related_name to access DocumentProperties from Document. (There's no actual change to the database.) --- ...elated_name_Document_documentproperties.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 pandora/entity/migrations/0004_related_name_Document_documentproperties.py diff --git a/pandora/entity/migrations/0004_related_name_Document_documentproperties.py b/pandora/entity/migrations/0004_related_name_Document_documentproperties.py new file mode 100644 index 00000000..612d315f --- /dev/null +++ b/pandora/entity/migrations/0004_related_name_Document_documentproperties.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2016-04-21 06:23 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('entity', '0003_documentproperties_data'), + ] + + operations = [ + migrations.AlterField( + model_name='documentproperties', + name='document', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='documentproperties', to='document.Document'), + ), + ] From 39b9b48be293e9f18b182c230ff4ee90616d28f7 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Wed, 4 May 2016 16:55:24 +0100 Subject: [PATCH 2/2] archive: fix migrations for upload_to function renamings 9c75526 renamed these functions. The function doesn't affect the DB schema so it should be safe to just modify the migraiton. --- pandora/archive/migrations/0001_initial.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora/archive/migrations/0001_initial.py b/pandora/archive/migrations/0001_initial.py index 1acc3379..3f0be31d 100644 --- a/pandora/archive/migrations/0001_initial.py +++ b/pandora/archive/migrations/0001_initial.py @@ -57,7 +57,7 @@ class Migration(migrations.Migration): ('is_audio', models.BooleanField(default=False)), ('is_video', models.BooleanField(default=False)), ('is_subtitle', models.BooleanField(default=False)), - ('data', models.FileField(blank=True, null=True, upload_to=archive.models.get_data_path)), + ('data', models.FileField(blank=True, null=True, upload_to=archive.models.data_path)), ], ), migrations.CreateModel( @@ -93,7 +93,7 @@ class Migration(migrations.Migration): ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('resolution', models.IntegerField(default=96)), ('format', models.CharField(default=b'webm', max_length=255)), - ('media', models.FileField(blank=True, default=None, upload_to=archive.models.get_path)), + ('media', models.FileField(blank=True, default=None, upload_to=archive.models.stream_path)), ('available', models.BooleanField(default=False)), ('oshash', models.CharField(db_index=True, max_length=16, null=True)), ('info', oxdjango.fields.DictField(default={})),