summaryrefslogtreecommitdiff
path: root/sbhs_server/tables/migrations
diff options
context:
space:
mode:
authorttt2017-05-13 00:29:47 +0530
committerttt2017-05-13 00:29:47 +0530
commit4336f5f06f61de30ae3fa54650fce63a9d5ef5be (patch)
tree23b4ee9b8e8f24bf732acf2f7ad22ed50cdd5670 /sbhs_server/tables/migrations
downloadSBHS-2018-Rpi-4336f5f06f61de30ae3fa54650fce63a9d5ef5be.tar.gz
SBHS-2018-Rpi-4336f5f06f61de30ae3fa54650fce63a9d5ef5be.tar.bz2
SBHS-2018-Rpi-4336f5f06f61de30ae3fa54650fce63a9d5ef5be.zip
added all server files
Diffstat (limited to 'sbhs_server/tables/migrations')
-rw-r--r--sbhs_server/tables/migrations/0001_initial.py150
-rw-r--r--sbhs_server/tables/migrations/0002_remove_experiment_checksum.py78
-rw-r--r--sbhs_server/tables/migrations/0003_add_field_Booking_booking_date.py79
-rw-r--r--sbhs_server/tables/migrations/0004_add_field_Experiment_checksum.py80
-rw-r--r--sbhs_server/tables/migrations/0005_load_boards_data.py75
-rw-r--r--sbhs_server/tables/migrations/0006_load_sample_users_data.py84
-rw-r--r--sbhs_server/tables/migrations/__init__.py0
7 files changed, 546 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..b6de197
--- /dev/null
+++ b/sbhs_server/tables/migrations/0001_initial.py
@@ -0,0 +1,150 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding model 'Board'
+ db.create_table(u'tables_board', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('trashed_at', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
+ ('mid', self.gf('django.db.models.fields.IntegerField')(unique=True)),
+ ('online', self.gf('django.db.models.fields.BooleanField')(default=True)),
+ ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
+ ('updated_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
+ ))
+ db.send_create_signal(u'tables', ['Board'])
+
+ # Adding model 'Account'
+ db.create_table(u'tables_account', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('password', self.gf('django.db.models.fields.CharField')(max_length=128)),
+ ('last_login', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
+ ('trashed_at', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
+ ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
+ ('username', self.gf('django.db.models.fields.CharField')(unique=True, max_length=127)),
+ ('email', self.gf('django.db.models.fields.EmailField')(unique=True, max_length=255)),
+ ('is_active', self.gf('django.db.models.fields.BooleanField')(default=False)),
+ ('is_admin', self.gf('django.db.models.fields.BooleanField')(default=False)),
+ ('board', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['tables.Board'])),
+ ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
+ ('updated_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
+ ))
+ db.send_create_signal(u'tables', ['Account'])
+
+ # Adding model 'Slot'
+ db.create_table(u'tables_slot', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('trashed_at', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
+ ('start_hour', self.gf('django.db.models.fields.IntegerField')()),
+ ('start_minute', self.gf('django.db.models.fields.IntegerField')()),
+ ('end_hour', self.gf('django.db.models.fields.IntegerField')()),
+ ('end_minute', self.gf('django.db.models.fields.IntegerField')()),
+ ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
+ ('updated_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
+ ))
+ db.send_create_signal(u'tables', ['Slot'])
+
+ # Adding model 'Booking'
+ db.create_table(u'tables_booking', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('trashed_at', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
+ ('account', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['tables.Account'])),
+ ('slot', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['tables.Slot'])),
+ ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
+ ('updated_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
+ ))
+ db.send_create_signal(u'tables', ['Booking'])
+
+ # Adding model 'Experiment'
+ db.create_table(u'tables_experiment', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('trashed_at', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
+ ('booking', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['tables.Booking'])),
+ ('log', self.gf('django.db.models.fields.CharField')(max_length=255)),
+ ('checksum', self.gf('django.db.models.fields.CharField')(max_length=127)),
+ ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
+ ('updated_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
+ ))
+ db.send_create_signal(u'tables', ['Experiment'])
+
+
+ def backwards(self, orm):
+ # Deleting model 'Board'
+ db.delete_table(u'tables_board')
+
+ # Deleting model 'Account'
+ db.delete_table(u'tables_account')
+
+ # Deleting model 'Slot'
+ db.delete_table(u'tables_slot')
+
+ # Deleting model 'Booking'
+ db.delete_table(u'tables_booking')
+
+ # Deleting model 'Experiment'
+ db.delete_table(u'tables_experiment')
+
+
+ models = {
+ u'tables.account': {
+ 'Meta': {'object_name': 'Account'},
+ 'board': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Board']"}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_admin': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '127'})
+ },
+ u'tables.board': {
+ 'Meta': {'object_name': 'Board'},
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'mid': ('django.db.models.fields.IntegerField', [], {'unique': 'True'}),
+ 'online': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'tables.booking': {
+ 'Meta': {'object_name': 'Booking'},
+ 'account': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Account']"}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'slot': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Slot']"}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'tables.experiment': {
+ 'Meta': {'object_name': 'Experiment'},
+ 'booking': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Booking']"}),
+ 'checksum': ('django.db.models.fields.CharField', [], {'max_length': '127'}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'log': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'tables.slot': {
+ 'Meta': {'object_name': 'Slot'},
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'end_hour': ('django.db.models.fields.IntegerField', [], {}),
+ 'end_minute': ('django.db.models.fields.IntegerField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'start_hour': ('django.db.models.fields.IntegerField', [], {}),
+ 'start_minute': ('django.db.models.fields.IntegerField', [], {}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ }
+ }
+
+ complete_apps = ['tables'] \ No newline at end of file
diff --git a/sbhs_server/tables/migrations/0002_remove_experiment_checksum.py b/sbhs_server/tables/migrations/0002_remove_experiment_checksum.py
new file mode 100644
index 0000000..4771abf
--- /dev/null
+++ b/sbhs_server/tables/migrations/0002_remove_experiment_checksum.py
@@ -0,0 +1,78 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Deleting field 'Experiment.checksum'
+ db.delete_column(u'tables_experiment', 'checksum')
+
+
+ def backwards(self, orm):
+ # Adding field 'Experiment.checksum'
+ db.add_column(u'tables_experiment', 'checksum',
+ self.gf('django.db.models.fields.CharField')(default='0', max_length=127),
+ keep_default=False)
+
+
+ models = {
+ u'tables.account': {
+ 'Meta': {'object_name': 'Account'},
+ 'board': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Board']"}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_admin': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '127'})
+ },
+ u'tables.board': {
+ 'Meta': {'object_name': 'Board'},
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'mid': ('django.db.models.fields.IntegerField', [], {'unique': 'True'}),
+ 'online': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'tables.booking': {
+ 'Meta': {'object_name': 'Booking'},
+ 'account': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Account']"}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'slot': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Slot']"}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'tables.experiment': {
+ 'Meta': {'object_name': 'Experiment'},
+ 'booking': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Booking']"}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'log': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'tables.slot': {
+ 'Meta': {'object_name': 'Slot'},
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'end_hour': ('django.db.models.fields.IntegerField', [], {}),
+ 'end_minute': ('django.db.models.fields.IntegerField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'start_hour': ('django.db.models.fields.IntegerField', [], {}),
+ 'start_minute': ('django.db.models.fields.IntegerField', [], {}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ }
+ }
+
+ complete_apps = ['tables'] \ No newline at end of file
diff --git a/sbhs_server/tables/migrations/0003_add_field_Booking_booking_date.py b/sbhs_server/tables/migrations/0003_add_field_Booking_booking_date.py
new file mode 100644
index 0000000..c6c4ec1
--- /dev/null
+++ b/sbhs_server/tables/migrations/0003_add_field_Booking_booking_date.py
@@ -0,0 +1,79 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'Booking.booking_date'
+ db.add_column(u'tables_booking', 'booking_date',
+ self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2014, 5, 11, 0, 0)),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'Booking.booking_date'
+ db.delete_column(u'tables_booking', 'booking_date')
+
+
+ models = {
+ u'tables.account': {
+ 'Meta': {'object_name': 'Account'},
+ 'board': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Board']"}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_admin': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '127'})
+ },
+ u'tables.board': {
+ 'Meta': {'object_name': 'Board'},
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'mid': ('django.db.models.fields.IntegerField', [], {'unique': 'True'}),
+ 'online': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'tables.booking': {
+ 'Meta': {'object_name': 'Booking'},
+ 'account': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Account']"}),
+ 'booking_date': ('django.db.models.fields.DateTimeField', [], {}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'slot': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Slot']"}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'tables.experiment': {
+ 'Meta': {'object_name': 'Experiment'},
+ 'booking': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Booking']"}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'log': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'tables.slot': {
+ 'Meta': {'object_name': 'Slot'},
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'end_hour': ('django.db.models.fields.IntegerField', [], {}),
+ 'end_minute': ('django.db.models.fields.IntegerField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'start_hour': ('django.db.models.fields.IntegerField', [], {}),
+ 'start_minute': ('django.db.models.fields.IntegerField', [], {}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ }
+ }
+
+ complete_apps = ['tables'] \ No newline at end of file
diff --git a/sbhs_server/tables/migrations/0004_add_field_Experiment_checksum.py b/sbhs_server/tables/migrations/0004_add_field_Experiment_checksum.py
new file mode 100644
index 0000000..7f17e89
--- /dev/null
+++ b/sbhs_server/tables/migrations/0004_add_field_Experiment_checksum.py
@@ -0,0 +1,80 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'Experiment.checksum'
+ db.add_column(u'tables_experiment', 'checksum',
+ self.gf('django.db.models.fields.CharField')(default='NONE', max_length=255),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'Experiment.checksum'
+ db.delete_column(u'tables_experiment', 'checksum')
+
+
+ models = {
+ u'tables.account': {
+ 'Meta': {'object_name': 'Account'},
+ 'board': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Board']"}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_admin': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '127'})
+ },
+ u'tables.board': {
+ 'Meta': {'object_name': 'Board'},
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'mid': ('django.db.models.fields.IntegerField', [], {'unique': 'True'}),
+ 'online': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'tables.booking': {
+ 'Meta': {'object_name': 'Booking'},
+ 'account': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Account']"}),
+ 'booking_date': ('django.db.models.fields.DateTimeField', [], {}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'slot': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Slot']"}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'tables.experiment': {
+ 'Meta': {'object_name': 'Experiment'},
+ 'booking': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Booking']"}),
+ 'checksum': ('django.db.models.fields.CharField', [], {'default': "'NONE'", 'max_length': '255'}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'log': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'tables.slot': {
+ 'Meta': {'object_name': 'Slot'},
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'end_hour': ('django.db.models.fields.IntegerField', [], {}),
+ 'end_minute': ('django.db.models.fields.IntegerField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'start_hour': ('django.db.models.fields.IntegerField', [], {}),
+ 'start_minute': ('django.db.models.fields.IntegerField', [], {}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ }
+ }
+
+ complete_apps = ['tables'] \ No newline at end of file
diff --git a/sbhs_server/tables/migrations/0005_load_boards_data.py b/sbhs_server/tables/migrations/0005_load_boards_data.py
new file mode 100644
index 0000000..8ce61a7
--- /dev/null
+++ b/sbhs_server/tables/migrations/0005_load_boards_data.py
@@ -0,0 +1,75 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+from sbhs_server.tables.models import Board
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ for i in xrange(1, 41):
+ Board.objects.create(id=i, mid=i)
+
+ def backwards(self, orm):
+ Board.objects.filter(mid__in=range(1,41)).delete()
+
+ models = {
+ u'tables.account': {
+ 'Meta': {'object_name': 'Account'},
+ 'board': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Board']"}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_admin': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '127'})
+ },
+ u'tables.board': {
+ 'Meta': {'object_name': 'Board'},
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'mid': ('django.db.models.fields.IntegerField', [], {'unique': 'True'}),
+ 'online': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'tables.booking': {
+ 'Meta': {'object_name': 'Booking'},
+ 'account': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Account']"}),
+ 'booking_date': ('django.db.models.fields.DateTimeField', [], {}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'slot': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Slot']"}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'tables.experiment': {
+ 'Meta': {'object_name': 'Experiment'},
+ 'booking': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Booking']"}),
+ 'checksum': ('django.db.models.fields.CharField', [], {'default': "'NONE'", 'max_length': '255'}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'log': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'tables.slot': {
+ 'Meta': {'object_name': 'Slot'},
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'end_hour': ('django.db.models.fields.IntegerField', [], {}),
+ 'end_minute': ('django.db.models.fields.IntegerField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'start_hour': ('django.db.models.fields.IntegerField', [], {}),
+ 'start_minute': ('django.db.models.fields.IntegerField', [], {}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ }
+ }
+
+ complete_apps = ['tables'] \ No newline at end of file
diff --git a/sbhs_server/tables/migrations/0006_load_sample_users_data.py b/sbhs_server/tables/migrations/0006_load_sample_users_data.py
new file mode 100644
index 0000000..5f287ac
--- /dev/null
+++ b/sbhs_server/tables/migrations/0006_load_sample_users_data.py
@@ -0,0 +1,84 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+from sbhs_server.tables.models import Account
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ for i in xrange(1, 41):
+ account = Account(
+ name="Sample User %d" % i,
+ username="suser%d" % i,
+ email="suser%d@os-hardware.in" % i,
+ board_id=i,
+ is_active=1
+ )
+ account.set_password("suser%d%d" % (i, 4229))
+ account.save()
+
+ def backwards(self, orm):
+ for i in xrange(1, 41):
+ Account.objects.filter(username="suser%d" % i).delete()
+
+ models = {
+ u'tables.account': {
+ 'Meta': {'object_name': 'Account'},
+ 'board': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Board']"}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '255'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_admin': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '127'})
+ },
+ u'tables.board': {
+ 'Meta': {'object_name': 'Board'},
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'mid': ('django.db.models.fields.IntegerField', [], {'unique': 'True'}),
+ 'online': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'tables.booking': {
+ 'Meta': {'object_name': 'Booking'},
+ 'account': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Account']"}),
+ 'booking_date': ('django.db.models.fields.DateTimeField', [], {}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'slot': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Slot']"}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'tables.experiment': {
+ 'Meta': {'object_name': 'Experiment'},
+ 'booking': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['tables.Booking']"}),
+ 'checksum': ('django.db.models.fields.CharField', [], {'default': "'NONE'", 'max_length': '255'}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'log': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ u'tables.slot': {
+ 'Meta': {'object_name': 'Slot'},
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'end_hour': ('django.db.models.fields.IntegerField', [], {}),
+ 'end_minute': ('django.db.models.fields.IntegerField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'start_hour': ('django.db.models.fields.IntegerField', [], {}),
+ 'start_minute': ('django.db.models.fields.IntegerField', [], {}),
+ 'trashed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ }
+ }
+
+ complete_apps = ['tables'] \ No newline at end of file
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