2016-06-07 20:59:13 +00:00
# -*- coding: utf-8 -*-
2017-01-13 10:49:51 +00:00
# Generated by Django 1.10.3 on 2017-01-13 10:49
2016-06-07 20:59:13 +00:00
from __future__ import unicode_literals
2016-06-14 21:58:04 +00:00
import accounts . utils
2016-06-11 13:42:40 +00:00
from django . conf import settings
2016-06-07 20:59:13 +00:00
from django . db import migrations , models
2016-06-12 15:11:11 +00:00
import django . db . models . deletion
2016-06-07 20:59:13 +00:00
class Migration ( migrations . Migration ) :
initial = True
dependencies = [
2016-06-12 21:39:04 +00:00
migrations . swappable_dependency ( settings . AUTH_USER_MODEL ) ,
2016-06-29 23:02:00 +00:00
( ' sites ' , ' 0002_alter_domain_unique ' ) ,
2016-06-07 20:59:13 +00:00
]
operations = [
2017-01-13 10:49:51 +00:00
migrations . CreateModel (
name = ' AvailabilityTimeslot ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' start ' , models . DateTimeField ( blank = True ) ) ,
( ' end ' , models . DateTimeField ( blank = True ) ) ,
] ,
) ,
migrations . CreateModel (
name = ' Connector ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' name ' , models . CharField ( max_length = 64 , unique = True ) ) ,
] ,
options = {
' abstract ' : False ,
} ,
) ,
2016-06-07 20:59:13 +00:00
migrations . CreateModel (
2016-06-14 19:39:04 +00:00
name = ' Participation ' ,
2016-06-12 15:11:11 +00:00
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
2016-06-29 23:02:00 +00:00
( ' created ' , models . DateTimeField ( auto_now_add = True ) ) ,
( ' updated ' , models . DateTimeField ( auto_now = True ) ) ,
2017-01-13 10:49:51 +00:00
( ' need_transport ' , models . NullBooleanField ( default = None , verbose_name = ' Defray transportation? ' ) ) ,
2016-06-12 15:11:11 +00:00
( ' arrival ' , models . DateTimeField ( blank = True , null = True ) ) ,
( ' departure ' , models . DateTimeField ( blank = True , null = True ) ) ,
2017-01-13 10:49:51 +00:00
( ' transport_city_outward ' , models . CharField ( blank = True , default = ' ' , max_length = 256 , verbose_name = ' Departure city ' ) ) ,
( ' transport_city_return ' , models . CharField ( blank = True , default = ' ' , help_text = ' If different from departure city ' , max_length = 256 , verbose_name = ' Return city ' ) ) ,
( ' transport_booked ' , models . BooleanField ( default = False ) ) ,
( ' accommodation ' , models . IntegerField ( blank = True , choices = [ ( 0 , ' No ' ) , ( 1 , ' Hotel ' ) , ( 2 , ' Homestay ' ) ] , null = True , verbose_name = ' Need accommodation? ' ) ) ,
( ' accommodation_booked ' , models . BooleanField ( default = False ) ) ,
( ' constraints ' , models . TextField ( blank = True , verbose_name = ' Constraints ' ) ) ,
2016-06-29 23:02:00 +00:00
( ' sound ' , models . BooleanField ( default = False , verbose_name = ' I need sound ' ) ) ,
2017-01-13 10:49:51 +00:00
( ' videotaped ' , models . BooleanField ( default = True , verbose_name = " I ' m ok to be recorded on video " ) ) ,
( ' video_licence ' , models . IntegerField ( choices = [ ( 1 , ' CC-Zero ' ) , ( 2 , ' CC-BY ' ) , ( 3 , ' CC-BY-SA ' ) , ( 4 , ' CC-BY-ND ' ) , ( 5 , ' CC-BY-NC ' ) , ( 6 , ' CC-BY-NC-SA ' ) , ( 7 , ' CC-BY-NC-ND ' ) ] , default = 2 , verbose_name = ' Video licence ' ) ) ,
( ' notes ' , models . TextField ( blank = True , default = ' ' , help_text = ' This field is only visible by organizers. ' , verbose_name = ' Notes ' ) ) ,
2016-06-29 23:02:00 +00:00
( ' orga ' , models . BooleanField ( default = False ) ) ,
2017-01-13 10:49:51 +00:00
( ' connector ' , models . ManyToManyField ( blank = True , to = ' accounts.Connector ' , verbose_name = ' I can output ' ) ) ,
2016-06-29 23:02:00 +00:00
( ' site ' , models . ForeignKey ( on_delete = django . db . models . deletion . CASCADE , to = ' sites.Site ' ) ) ,
2016-06-12 15:11:11 +00:00
] ,
) ,
2016-06-14 19:39:04 +00:00
migrations . CreateModel (
name = ' Profile ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
2016-06-29 23:02:00 +00:00
( ' created ' , models . DateTimeField ( auto_now_add = True ) ) ,
( ' updated ' , models . DateTimeField ( auto_now = True ) ) ,
2017-01-13 10:49:51 +00:00
( ' phone_number ' , models . CharField ( blank = True , default = ' ' , max_length = 16 , verbose_name = ' Phone number ' ) ) ,
2016-06-14 19:39:04 +00:00
( ' biography ' , models . TextField ( blank = True , verbose_name = ' Biography ' ) ) ,
2016-06-29 23:02:00 +00:00
( ' email_token ' , models . CharField ( default = accounts . utils . generate_user_uid , max_length = 12 , unique = True ) ) ,
2016-06-14 19:39:04 +00:00
( ' user ' , models . OneToOneField ( on_delete = django . db . models . deletion . CASCADE , to = settings . AUTH_USER_MODEL ) ) ,
] ,
2016-06-29 23:02:00 +00:00
options = {
' abstract ' : False ,
} ,
) ,
2017-01-13 10:49:51 +00:00
migrations . CreateModel (
name = ' Transport ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' name ' , models . CharField ( max_length = 64 , unique = True ) ) ,
] ,
options = {
' abstract ' : False ,
} ,
) ,
migrations . AddField (
model_name = ' participation ' ,
name = ' transport ' ,
field = models . ManyToManyField ( blank = True , to = ' accounts.Transport ' , verbose_name = ' I want to travel by ' ) ,
) ,
migrations . AddField (
model_name = ' participation ' ,
name = ' user ' ,
field = models . ForeignKey ( on_delete = django . db . models . deletion . CASCADE , to = settings . AUTH_USER_MODEL ) ,
) ,
migrations . AddField (
model_name = ' availabilitytimeslot ' ,
name = ' participation ' ,
field = models . ForeignKey ( on_delete = django . db . models . deletion . CASCADE , related_name = ' availabilities ' , to = ' accounts.Participation ' ) ,
) ,
2016-06-29 23:02:00 +00:00
migrations . AlterUniqueTogether (
name = ' participation ' ,
unique_together = set ( [ ( ' site ' , ' user ' ) ] ) ,
2016-06-14 19:39:04 +00:00
) ,
2016-06-07 20:59:13 +00:00
]