Allow empty contact forms.
[wolnelektury.git] / src / social / migrations / 0005_auto_20190318_1309.py
1 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
3 #
4 from django.db import migrations, models
5 import django.db.models.deletion
6
7
8 class Migration(migrations.Migration):
9
10     dependencies = [
11         ('social', '0004_auto_20170725_1204'),
12     ]
13
14     operations = [
15         migrations.CreateModel(
16             name='BannerGroup',
17             fields=[
18                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
19                 ('name', models.CharField(max_length=255, unique=True, verbose_name='name')),
20                 ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='created at')),
21             ],
22             options={
23                 'verbose_name': 'banner group',
24                 'verbose_name_plural': 'banner groups',
25                 'ordering': ('name',),
26             },
27         ),
28         migrations.CreateModel(
29             name='Carousel',
30             fields=[
31                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
32                 ('slug', models.SlugField(unique=True, verbose_name='slug')),
33             ],
34             options={
35                 'verbose_name': 'carousel',
36                 'verbose_name_plural': 'carousels',
37                 'ordering': ('slug',),
38             },
39         ),
40         migrations.CreateModel(
41             name='CarouselItem',
42             fields=[
43                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
44                 ('order', models.PositiveSmallIntegerField(unique=True)),
45             ],
46             options={
47                 'verbose_name': 'carousel item',
48                 'verbose_name_plural': 'carousel items',
49                 'ordering': ('order',),
50             },
51         ),
52         migrations.AddField(
53             model_name='cite',
54             name='created_at',
55             field=models.DateTimeField(auto_now_add=True, default='2007-09-17 12:00+00', verbose_name='created at'),
56             preserve_default=False,
57         ),
58         migrations.AddField(
59             model_name='cite',
60             name='picture',
61             field=models.ImageField(blank=True, upload_to='', verbose_name='picture'),
62         ),
63         migrations.AddField(
64             model_name='cite',
65             name='video',
66             field=models.URLField(blank=True, verbose_name='video'),
67         ),
68         migrations.AddField(
69             model_name='carouselitem',
70             name='banner',
71             field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='social.Cite'),
72         ),
73         migrations.AddField(
74             model_name='carouselitem',
75             name='banner_group',
76             field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='social.BannerGroup'),
77         ),
78         migrations.AddField(
79             model_name='carouselitem',
80             name='carousel',
81             field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='social.Carousel'),
82         ),
83         migrations.AddField(
84             model_name='cite',
85             name='group',
86             field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='social.BannerGroup', verbose_name='group'),
87         ),
88         migrations.AlterUniqueTogether(
89             name='carouselitem',
90             unique_together=set([('carousel', 'order')]),
91         ),
92     ]