0001_initial.py 2.13 KB
Newer Older
fred's avatar
fred committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
# -*- coding: utf-8 -*-
import 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 'NonstopFile'
        db.create_table(u'nonstop_nonstopfile', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('filepath', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('creation_timestamp', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, null=True, blank=True)),
        ))
        db.send_create_signal(u'nonstop', ['NonstopFile'])

        # Adding model 'SomaLogLine'
        db.create_table(u'nonstop_somalogline', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('filepath', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['nonstop.NonstopFile'])),
            ('play_timestamp', self.gf('django.db.models.fields.DateTimeField')()),
        ))
        db.send_create_signal(u'nonstop', ['SomaLogLine'])


    def backwards(self, orm):
        # Deleting model 'NonstopFile'
        db.delete_table(u'nonstop_nonstopfile')

        # Deleting model 'SomaLogLine'
        db.delete_table(u'nonstop_somalogline')


    models = {
        u'nonstop.nonstopfile': {
            'Meta': {'object_name': 'NonstopFile'},
            'creation_timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
            'filepath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
        },
        u'nonstop.somalogline': {
            'Meta': {'ordering': "['play_timestamp']", 'object_name': 'SomaLogLine'},
            'filepath': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['nonstop.NonstopFile']"}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'play_timestamp': ('django.db.models.fields.DateTimeField', [], {})
        }
    }

    complete_apps = ['nonstop']