1 # -*- coding: utf-8 -*-
3 from south.db import db
4 from south.v2 import SchemaMigration
5 from django.db import models
8 class Migration(SchemaMigration):
10 def forwards(self, orm):
12 db.create_table(u'polls_poll', (
13 (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14 ('question', self.gf('django.db.models.fields.TextField')()),
15 ('slug', self.gf('django.db.models.fields.SlugField')(max_length=50)),
16 ('open', self.gf('django.db.models.fields.BooleanField')(default=False)),
18 db.send_create_signal(u'polls', ['Poll'])
20 # Adding model 'PollItem'
21 db.create_table(u'polls_pollitem', (
22 (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
23 ('poll', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['polls.Poll'])),
24 ('content', self.gf('django.db.models.fields.TextField')()),
25 ('vote_count', self.gf('django.db.models.fields.IntegerField')(default=0)),
27 db.send_create_signal(u'polls', ['PollItem'])
30 def backwards(self, orm):
31 # Deleting model 'Poll'
32 db.delete_table(u'polls_poll')
34 # Deleting model 'PollItem'
35 db.delete_table(u'polls_pollitem')
40 'Meta': {'object_name': 'Poll'},
41 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
42 'open': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
43 'question': ('django.db.models.fields.TextField', [], {}),
44 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
47 'Meta': {'object_name': 'PollItem'},
48 'content': ('django.db.models.fields.TextField', [], {}),
49 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
50 'poll': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['polls.Poll']"}),
51 'vote_count': ('django.db.models.fields.IntegerField', [], {'default': '0'})
55 complete_apps = ['polls']