0001_squashed_0006_auto_20160707_1700.py 4.64 KB
Newer Older
Thom Wiggers's avatar
Thom Wiggers committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# -*- coding: utf-8 -*-
# Generated by Django 1.10b1 on 2016-07-07 15:04
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion
import django.db.models.manager


class Migration(migrations.Migration):

    replaces = [('committees', '0001_initial'), ('committees', '0002_committee_permissions'), ('committees', '0003_auto_20160707_1356'), ('committees', '0004_auto_20160707_1357'), ('committees', '0005_auto_20160707_1512'), ('committees', '0006_auto_20160707_1700')]

    initial = True

    dependencies = [
        ('members', '0001_initial'),
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Committee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=40, verbose_name='Committee name')),
                ('description', models.TextField(verbose_name='Description')),
                ('photo', models.ImageField(upload_to='', verbose_name='Image')),
            ],
        ),
        migrations.CreateModel(
            name='CommitteeMembership',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('since', models.DateField(auto_now_add=True)),
                ('until', models.DateField()),
                ('chair', models.BooleanField()),
                ('committee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='committees.Committee')),
                ('member', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='members.Member')),
            ],
            managers=[
                ('active_memberships', django.db.models.manager.Manager()),
            ],
        ),
        migrations.AddField(
            model_name='committee',
            name='members',
            field=models.ManyToManyField(through='committees.CommitteeMembership', to='members.Member'),
        ),
        migrations.AddField(
            model_name='committee',
            name='permissions',
            field=models.ManyToManyField(blank=True, to='auth.Permission', verbose_name='permissions'),
        ),
        migrations.AlterModelOptions(
            name='committee',
            options={'verbose_name': 'committee', 'verbose_name_plural': 'committees'},
        ),
        migrations.AlterModelOptions(
            name='committeemembership',
            options={'verbose_name': 'committee membership', 'verbose_name_plural': 'committee memberships'},
        ),
        migrations.AlterField(
            model_name='committeemembership',
            name='chair',
            field=models.BooleanField(help_text='There can only be one chair at a time!', verbose_name='Chair of the committee'),
        ),
        migrations.AlterField(
            model_name='committeemembership',
            name='committee',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='committees.Committee', verbose_name='Committee'),
        ),
        migrations.AlterField(
            model_name='committeemembership',
            name='member',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='members.Member', verbose_name='Member'),
        ),
        migrations.AlterField(
            model_name='committeemembership',
            name='since',
            field=models.DateField(auto_now_add=True, help_text='The date this member joined the committee in this role', verbose_name='Committee member since'),
        ),
        migrations.AlterField(
            model_name='committeemembership',
            name='until',
            field=models.DateField(blank=True, help_text="A member of this committee until this time (can't be in the future).", verbose_name='Committee member until'),
        ),
        migrations.AlterField(
            model_name='committeemembership',
            name='until',
            field=models.DateField(blank=True, help_text="A member of this committee until this time (can't be in the future).", null=True, verbose_name='Committee member until'),
        ),
        migrations.AlterField(
            model_name='committee',
            name='name',
            field=models.CharField(max_length=40, unique=True, verbose_name='Committee name'),
        ),
        migrations.AlterField(
            model_name='committeemembership',
            name='chair',
            field=models.BooleanField(default=False, help_text='There can only be one chair at a time!', verbose_name='Chair of the committee'),
        ),
    ]