class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name='Room', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('code', models.CharField( default=backend.api.models.generate_unique_code, max_length=8, unique=True)), ('host', models.CharField(max_length=50, unique=True)), ('guest_can_pause', models.BooleanField(default=False)), ('votes_to_skip', models.IntegerField(default=1)), ('created_at', models.DateTimeField(auto_now_add=True)), ('current_song', models.CharField(max_length=50, null=True)), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Requirement', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('deleted', models.DateTimeField(editable=False, null=True)), ('created_at', models.DateTimeField(default=django.utils.timezone.now)), ('text', models.TextField(blank=True, null=True)), ('signature', models.TextField(blank=True, null=True)), ('acknowledged', models.BooleanField(default=False)), ], options={ 'abstract': False, }, ), migrations.CreateModel( name='Token', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('deleted', models.DateTimeField(editable=False, null=True)), ('created_at', models.DateTimeField(default=django.utils.timezone.now)), ('key', models.CharField(db_index=True, default=backend.api.models.Token.make_key, max_length=128)), ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], options={ 'abstract': False, }, ), migrations.CreateModel( name='Transaction', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('deleted', models.DateTimeField(editable=False, null=True)), ('created_at', models.DateTimeField(default=django.utils.timezone.now)), ('amount', models.DecimalField(decimal_places=8, max_digits=11)), ('success', models.BooleanField(default=False)), ('error', models.TextField(null=True)), ('recipient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='api_trans_recipient', to=settings.AUTH_USER_MODEL)), ], options={ 'abstract': False, }, ), migrations.CreateModel( name='Wallet', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('deleted', models.DateTimeField(editable=False, null=True)), ('created_at', models.DateTimeField(default=django.utils.timezone.now)), ('private_key', backend.api.fields.WIFPrivateKeyField()), ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], options={ 'abstract': False, }, ), migrations.AddField( model_name='transaction', name='recipient_wallet', field=models.ForeignKey( null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='api_trans_recipient_wallet', to='api.Wallet'), ), migrations.AddField( model_name='transaction', name='sender', field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name='api_trans_sender', to=settings.AUTH_USER_MODEL), ), migrations.AddField( model_name='transaction', name='sender_wallet', field=models.ForeignKey( null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='api_trans_sender_wallet', to='api.Wallet'), ), migrations.AddField( model_name='requirement', name='transaction', field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name='api_req_transaction', to='api.Transaction'), ), migrations.AddField( model_name='requirement', name='user', field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name='api_req_user', to=settings.AUTH_USER_MODEL), ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Entity', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=100, validators=[backend.api.models.no_unsafe])), ('url', models.CharField(max_length=100, validators=[backend.api.models.no_unsafe])), ('image', models.ImageField(null=True, upload_to=backend.api.models.Uuid4Path())), ('type', models.IntegerField(choices=[(1, 'member'), (2, 'other')])), ], options={ 'verbose_name_plural': 'Entities', }, ), migrations.CreateModel( name='Post', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=100, validators=[backend.api.models.no_unsafe])), ('content', markdownx.models.MarkdownxField()), ('header', models.ImageField(blank=True, null=True, upload_to=backend.api.models.Uuid4Path())), ('featured', models.ImageField(blank=True, null=True, upload_to=backend.api.models.Uuid4Path())), ('slider', models.BooleanField(default=False)), ('created', models.DateTimeField(auto_now_add=True)), ('updated', models.DateTimeField(auto_now=True)), ], options={ 'ordering': ('created',), }, ), migrations.CreateModel( name='EventParticipants', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('label', models.CharField(max_length=100, validators=[backend.api.models.no_unsafe])), ('entities', models.ManyToManyField(to='api.Entity')), ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Post')), ], options={ 'verbose_name_plural': 'Events participants', }, ), migrations.CreateModel( name='EventDetails', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('start', models.DateTimeField()), ('end', models.DateTimeField()), ('place', models.CharField(blank=True, max_length=100, null=True, validators=[backend.api.models.no_unsafe])), ('post', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='api.Post')), ], options={ 'verbose_name_plural': 'Events details', }, ), migrations.CreateModel( name='Attachment', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=100, validators=[backend.api.models.no_unsafe])), ('file', models.FileField(upload_to=backend.api.models.Uuid4Path())), ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Post')), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Doctor', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=150)), ('crm', models.IntegerField(unique=True)), ('email', models.EmailField(blank=True, max_length=150, null=True)), ('phone', phone_field.models.PhoneField( blank=True, help_text= "Phone number must be in the format: '(DDD) 9XXXX-XXXX'. Only numbers", max_length=12, null=True)), ], options={ 'verbose_name': 'Doctor', 'verbose_name_plural': 'Doctors', }, ), migrations.CreateModel( name='Specialty', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=80)), ], options={ 'verbose_name': 'Specialty', 'verbose_name_plural': 'Specialties', }, ), migrations.CreateModel( name='Schedule', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('day', models.DateField(validators=[ backend.api.models.Schedule.validate_past_date ])), ('hourlys', django.contrib.postgres.fields.ArrayField( base_field=models.TimeField(), help_text= 'Add hours according to the example: 09:00,10:30', size=None)), ('doctor', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='doctor_schedule', to='api.doctor')), ], options={ 'verbose_name': 'Schedule', 'verbose_name_plural': 'Schedules', 'ordering': ['-day'], }, ), migrations.CreateModel( name='MedicalAppointment', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('day', models.DateField()), ('hourly', models.TimeField()), ('scheduling_date', models.DateTimeField(auto_now=True)), ('doctor', models.ForeignKey( null=True, on_delete=django.db.models.deletion.SET_NULL, to='api.doctor')), ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_appointment', to=settings.AUTH_USER_MODEL)), ], ), migrations.AddField( model_name='doctor', name='specialty', field=models.ForeignKey( null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='doctor_specialty', to='api.specialty'), ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='User', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('password', models.CharField(max_length=128, verbose_name='password')), ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), ('is_superuser', models.BooleanField( default=False, help_text= 'Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')), ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')), ('is_staff', models.BooleanField( default=False, help_text= 'Designates whether the user can log into this admin site.', verbose_name='staff status')), ('is_active', models.BooleanField( default=True, help_text= 'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), ('username', models.CharField(blank=True, max_length=30, verbose_name='username')), ('email', models.EmailField(max_length=254, unique=True, verbose_name='email address')), ('groups', models.ManyToManyField( blank=True, help_text= 'The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')), ('user_permissions', models.ManyToManyField( blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')), ], options={ 'ordering': ['-date_joined'], }, managers=[ ('objects', backend.api.models.LocalUserManager()), ], ), migrations.CreateModel( name='Archer', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('full_name', models.CharField(default='Unnamed archer', max_length=150, verbose_name='Full Name')), ('gender', models.CharField(choices=[('M', 'Male'), ('F', 'Female'), ('U', 'Unisex')], default='U', max_length=1, verbose_name='gender')), ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')), ('phone', models.CharField(blank=True, max_length=20, verbose_name='phone number')), ('nat_id', models.CharField(blank=True, max_length=30, verbose_name='National Archer ID')), ], options={ 'ordering': ['full_name'], }, ), migrations.CreateModel( name='Course', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', models.DateTimeField(auto_now_add=True)), ('name', models.CharField(default='Unnamed course', max_length=150, verbose_name='Course name')), ('description', models.TextField(blank=True)), ('location', models.CharField(blank=True, max_length=150)), ('halves', models.BooleanField(default=False)), ('creator', models.ForeignKey( null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='courses_created', to=settings.AUTH_USER_MODEL)), ], options={ 'ordering': ['-created'], }, ), migrations.CreateModel( name='Event', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', models.DateTimeField(auto_now_add=True)), ('date_start', models.DateField(default=django.utils.timezone.localdate)), ('date_end', models.DateField(default=django.utils.timezone.localdate)), ('is_open', models.BooleanField(default=True)), ('archive', models.BooleanField(default=False)), ('name', models.CharField(default='Unnamed event', max_length=150)), ('description', models.TextField(blank=True)), ('catering', models.BooleanField(default=False)), ('type', models.CharField(choices=[('private', 'Private'), ('club', 'Club'), ('open', 'Open')], default='private', max_length=10, verbose_name='event type')), ('tags', models.CharField(blank=True, max_length=255, verbose_name='event tags')), ('creator', models.ForeignKey( null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='events_created', to=settings.AUTH_USER_MODEL)), ], options={ 'ordering': ['-date_start'], }, ), migrations.CreateModel( name='Participant', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', models.DateTimeField(auto_now_add=True)), ('age_group', models.CharField(choices=[('C', 'Cub'), ('J', 'Junior'), ('A', 'Adult'), ('V', 'Veteran'), ('S', 'Senior')], max_length=1, verbose_name='age group')), ('style', models.CharField(choices=[('BB-C', 'Barebow Compound'), ('BB-R', 'Barebow Recurve'), ('BH-C', 'Bowhunter Compound'), ('BH-R', 'Bowhunter Recurve'), ('BL', 'Bowhunter Limited'), ('BU', 'Bowhunter Unlimited'), ('FS-C', 'Freestyle Limited Compound'), ('FS-R', 'Freestyle Limited Recurve'), ('FU', 'Freestyle Unlimited'), ('HB', 'Historic Longbow'), ('LB', 'Longbow'), ('TR', 'Traditional Recurve')], max_length=5, verbose_name='Shooting style')), ('eats', models.BooleanField(default=False)), ('comments', models.CharField(blank=True, max_length=255)), ('start_group', models.IntegerField(default=1)), ('archer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='events', to='api.Archer')), ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='participants', to='api.Event')), ], options={ 'ordering': ['created'], 'unique_together': {('archer', 'event', 'style')}, }, ), migrations.CreateModel( name='Round', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('ord', models.IntegerField(verbose_name='Round order')), ('label', models.CharField(blank=True, max_length=150, verbose_name='Label for round')), ('is_open', models.BooleanField(default=False, verbose_name='is round open')), ('start', models.DateTimeField(blank=True, null=True, verbose_name='Round start time')), ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='events', to='api.Course')), ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rounds', to='api.Event')), ], options={ 'ordering': ['ord'], 'unique_together': {('ord', 'course', 'event')}, }, ), migrations.CreateModel( name='ScoreCard', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('participant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='scorecards', to='api.Participant')), ('round', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='scorecards', to='api.Round')), ], options={ 'unique_together': {('participant', 'round')}, }, ), migrations.CreateModel( name='End', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('ord', models.IntegerField(verbose_name='End order')), ('label', models.CharField(blank=True, max_length=30)), ('nr_of_arrows', models.PositiveSmallIntegerField()), ('scoring', models.CharField(max_length=150)), ('x', models.BooleanField(default=True, verbose_name='Target has x')), ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ends', to='api.Course')), ], options={ 'ordering': ['ord'], }, ), migrations.CreateModel( name='Club', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(default='Unnamed archery club', max_length=150, verbose_name='Club name')), ('contact', models.TextField(verbose_name='Contact Information')), ('description', models.TextField()), ('creator', models.ForeignKey( null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='clubs_created', to=settings.AUTH_USER_MODEL)), ], options={ 'ordering': ['name'], }, ), migrations.CreateModel( name='Arrow', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('ord', models.IntegerField(verbose_name='arrow nr')), ('score', models.IntegerField(blank=True, null=True, verbose_name='arrow score')), ('x', models.BooleanField(default=False)), ('updated_at', models.DateTimeField(auto_now=True)), ('updated_by', models.EmailField(blank=True, max_length=254, null=True)), ('end', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='arrows', to='api.End')), ('scorecard', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='arrows', to='api.ScoreCard')), ], options={ 'ordering': ['end', 'ord'], }, ), migrations.AddField( model_name='archer', name='club', field=models.ForeignKey( null=True, on_delete=django.db.models.deletion.CASCADE, related_name='members', to='api.Club'), ), migrations.AddField( model_name='archer', name='user', field=models.OneToOneField( null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='archer', to=settings.AUTH_USER_MODEL), ), ]