diff options
author | ttt | 2017-05-13 00:29:47 +0530 |
---|---|---|
committer | ttt | 2017-05-13 00:29:47 +0530 |
commit | 4336f5f06f61de30ae3fa54650fce63a9d5ef5be (patch) | |
tree | 23b4ee9b8e8f24bf732acf2f7ad22ed50cdd5670 /sbhs_server/slot/migrations | |
download | SBHS-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/slot/migrations')
-rw-r--r-- | sbhs_server/slot/migrations/0001_slot_timing_data.py | 29 | ||||
-rw-r--r-- | sbhs_server/slot/migrations/__init__.py | 0 |
2 files changed, 29 insertions, 0 deletions
diff --git a/sbhs_server/slot/migrations/0001_slot_timing_data.py b/sbhs_server/slot/migrations/0001_slot_timing_data.py new file mode 100644 index 0000000..158f201 --- /dev/null +++ b/sbhs_server/slot/migrations/0001_slot_timing_data.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +from south.utils import datetime_utils as datetime +from south.db import db +from south.v2 import DataMigration +from django.db import models +from sbhs_server.tables.models import Slot + +class Migration(DataMigration): + + def forwards(self, orm): + # "Write your forwards methods here." + # Note: Don't use "from appname.models import ModelName". + # Use orm.ModelName to refer to models in this application, + # and orm['appname.ModelName'] for models in other applications. + for i in xrange(24): + Slot.objects.create(start_hour=i, end_hour=i, start_minute=0, end_minute=55) + + def backwards(self, orm): + # "Write your backwards methods here." + for i in xrange(24): + Slot.objects.delete(i) + + + models = { + + } + + complete_apps = ['slot'] + symmetrical = True diff --git a/sbhs_server/slot/migrations/__init__.py b/sbhs_server/slot/migrations/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/sbhs_server/slot/migrations/__init__.py |