summaryrefslogtreecommitdiff
path: root/sbhs_server
diff options
context:
space:
mode:
Diffstat (limited to 'sbhs_server')
-rw-r--r--sbhs_server/tables/migrations/0001_initial.py111
-rw-r--r--sbhs_server/tables/migrations/0002_remove_board_temp_offline.py19
-rw-r--r--sbhs_server/tables/migrations/0003_board_temp_offline.py20
-rw-r--r--sbhs_server/tables/migrations/__init__.py0
-rw-r--r--sbhs_server/tables/models.py1
5 files changed, 151 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'),
+ ),
+ ]
diff --git a/sbhs_server/tables/migrations/0002_remove_board_temp_offline.py b/sbhs_server/tables/migrations/0002_remove_board_temp_offline.py
new file mode 100644
index 0000000..55aa25d
--- /dev/null
+++ b/sbhs_server/tables/migrations/0002_remove_board_temp_offline.py
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.1 on 2017-06-09 17:43
+from __future__ import unicode_literals
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('tables', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.RemoveField(
+ model_name='board',
+ name='temp_offline',
+ ),
+ ]
diff --git a/sbhs_server/tables/migrations/0003_board_temp_offline.py b/sbhs_server/tables/migrations/0003_board_temp_offline.py
new file mode 100644
index 0000000..1c43ed1
--- /dev/null
+++ b/sbhs_server/tables/migrations/0003_board_temp_offline.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.1 on 2017-06-09 17:44
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('tables', '0002_remove_board_temp_offline'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='board',
+ name='temp_offline',
+ field=models.BooleanField(default=False),
+ ),
+ ]
diff --git a/sbhs_server/tables/migrations/__init__.py b/sbhs_server/tables/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sbhs_server/tables/migrations/__init__.py
diff --git a/sbhs_server/tables/models.py b/sbhs_server/tables/models.py
index c25a6d2..8c720b5 100644
--- a/sbhs_server/tables/models.py
+++ b/sbhs_server/tables/models.py
@@ -13,6 +13,7 @@ class Board(TrashableMixin):
mid = models.IntegerField(unique=True)
online = models.BooleanField(default=True)
+ temp_offline = models.BooleanField(default=False)
created_at = models.DateTimeField(auto_now_add=True, editable=False)
updated_at = models.DateTimeField(auto_now=True, editable=False)