diff options
Diffstat (limited to 'sbhs_server/tables/migrations/0001_initial.py')
-rw-r--r-- | sbhs_server/tables/migrations/0001_initial.py | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/sbhs_server/tables/migrations/0001_initial.py b/sbhs_server/tables/migrations/0001_initial.py new file mode 100644 index 0000000..95cd1e1 --- /dev/null +++ b/sbhs_server/tables/migrations/0001_initial.py @@ -0,0 +1,111 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.1 on 2017-06-09 17:34 +from __future__ import unicode_literals + +from django.conf import settings +import django.contrib.auth.models +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Account', + 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')), + ('trashed_at', models.DateTimeField(blank=True, editable=False, null=True, verbose_name='Trashed')), + ('name', models.CharField(max_length=255)), + ('username', models.CharField(max_length=127, unique=True)), + ('email', models.EmailField(max_length=255, unique=True)), + ('is_active', models.BooleanField(default=False)), + ('is_admin', models.BooleanField(default=False)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('updated_at', models.DateTimeField(auto_now=True)), + ], + options={ + 'abstract': False, + }, + managers=[ + ('objects', django.contrib.auth.models.UserManager()), + ], + ), + migrations.CreateModel( + name='Board', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('trashed_at', models.DateTimeField(blank=True, editable=False, null=True, verbose_name='Trashed')), + ('mid', models.IntegerField(unique=True)), + ('online', models.BooleanField(default=True)), + ('temp_offline', models.BooleanField(default=False)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('updated_at', models.DateTimeField(auto_now=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Booking', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('trashed_at', models.DateTimeField(blank=True, editable=False, null=True, verbose_name='Trashed')), + ('booking_date', models.DateTimeField()), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('updated_at', models.DateTimeField(auto_now=True)), + ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Experiment', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('trashed_at', models.DateTimeField(blank=True, editable=False, null=True, verbose_name='Trashed')), + ('log', models.CharField(max_length=255)), + ('checksum', models.CharField(default=b'NONE', max_length=255)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('updated_at', models.DateTimeField(auto_now=True)), + ('booking', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tables.Booking')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Slot', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('trashed_at', models.DateTimeField(blank=True, editable=False, null=True, verbose_name='Trashed')), + ('start_hour', models.IntegerField()), + ('start_minute', models.IntegerField()), + ('end_hour', models.IntegerField()), + ('end_minute', models.IntegerField()), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('updated_at', models.DateTimeField(auto_now=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.AddField( + model_name='booking', + name='slot', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tables.Slot'), + ), + migrations.AddField( + model_name='account', + name='board', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tables.Board'), + ), + ] |