X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/c226012e4114e09fd37cd384a2aada77476815cd..94ca8037f9a5891b7ded1c92c639e0fbc676e67b:/src/funding/migrations/0001_initial.py diff --git a/src/funding/migrations/0001_initial.py b/src/funding/migrations/0001_initial.py index f802027cf..6b511dadc 100644 --- a/src/funding/migrations/0001_initial.py +++ b/src/funding/migrations/0001_initial.py @@ -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(