Commit 51cd8c2b authored by fred's avatar fred

add migration support

parent b494af87
# -*- 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']
\ No newline at end of file
......@@ -17,6 +17,7 @@ setup(
author_email='fred@radiopanik.org',
packages=[
'nonstop',
'nonstop.migrations',
],
package_data={
'nonstop': [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment