update librarian, new mobi
[wolnelektury.git] / src / funding / migrations / 0001_initial.py
index f802027..6b511da 100644 (file)
@@ -1,6 +1,6 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
+# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+#
 from django.db import models, migrations
 import django.db.models.deletion
 
@@ -47,7 +47,7 @@ class Migration(migrations.Migration):
                 ('cover', models.ImageField(upload_to='funding/covers', verbose_name='Cover')),
                 ('notified_near', models.DateTimeField(null=True, verbose_name='Near-end notifications sent', blank=True)),
                 ('notified_end', models.DateTimeField(null=True, verbose_name='End notifications sent', blank=True)),
-                ('book', models.ForeignKey(blank=True, to='catalogue.Book', help_text='Published book.', null=True)),
+                ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, blank=True, to='catalogue.Book', help_text='Published book.', null=True)),
                 ('poll', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to='polls.Poll', help_text='Poll', null=True)),
             ],
             options={
@@ -65,7 +65,7 @@ class Migration(migrations.Migration):
                 ('name', models.CharField(max_length=255, verbose_name='name')),
                 ('long_name', models.CharField(max_length=255, verbose_name='long name')),
                 ('end_date', models.DateField(null=True, verbose_name='end date', blank=True)),
-                ('offer', models.ForeignKey(verbose_name='offer', blank=True, to='funding.Offer', null=True)),
+                ('offer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='offer', blank=True, to='funding.Offer', null=True)),
             ],
             options={
                 'ordering': ['-price'],
@@ -80,7 +80,7 @@ class Migration(migrations.Migration):
                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                 ('amount', models.DecimalField(verbose_name='amount', max_digits=10, decimal_places=2)),
                 ('timestamp', models.DateField(verbose_name='when')),
-                ('book', models.ForeignKey(to='catalogue.Book')),
+                ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalogue.Book')),
             ],
             options={
                 'ordering': ['-timestamp'],
@@ -92,7 +92,7 @@ class Migration(migrations.Migration):
         migrations.AddField(
             model_name='funding',
             name='offer',
-            field=models.ForeignKey(verbose_name='offer', to='funding.Offer'),
+            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, verbose_name='offer', to='funding.Offer'),
             preserve_default=True,
         ),
         migrations.AddField(