notification for new publications
[redakcja.git] / apps / organizations / migrations / 0001_initial.py
1 # -*- coding: utf-8 -*-
2 from __future__ import unicode_literals
3
4 from django.db import models, migrations
5 from django.conf import settings
6
7
8 class Migration(migrations.Migration):
9
10     dependencies = [
11         migrations.swappable_dependency(settings.AUTH_USER_MODEL),
12     ]
13
14     operations = [
15         migrations.CreateModel(
16             name='Membership',
17             fields=[
18                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
19                 ('status', models.CharField(default='regular', max_length=10, choices=[('pending', 'Membership pending'), ('regular', 'Regular member'), ('owner', 'Organizaition owner')])),
20                 ('created_at', models.DateTimeField(auto_now_add=True)),
21             ],
22             options={
23                 'ordering': ('user', 'organization'),
24             },
25         ),
26         migrations.CreateModel(
27             name='Organization',
28             fields=[
29                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
30                 ('name', models.CharField(max_length=1024)),
31                 ('created_at', models.DateTimeField(auto_now_add=True)),
32                 ('logo', models.ImageField(upload_to='people/logo', blank=True)),
33                 ('description', models.TextField(blank=True)),
34             ],
35         ),
36         migrations.AddField(
37             model_name='membership',
38             name='organization',
39             field=models.ForeignKey(to='organizations.Organization'),
40         ),
41         migrations.AddField(
42             model_name='membership',
43             name='user',
44             field=models.ForeignKey(to=settings.AUTH_USER_MODEL),
45         ),
46     ]