GzipPipelineCachedStorage from fnpdjango.
[wolnelektury.git] / apps / polls / migrations / 0001_initial.py
1 # -*- coding: utf-8 -*-
2 import datetime
3 from south.db import db
4 from south.v2 import SchemaMigration
5 from django.db import models
6
7
8 class Migration(SchemaMigration):
9
10     def forwards(self, orm):
11         # Adding model 'Poll'
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)),
17         ))
18         db.send_create_signal(u'polls', ['Poll'])
19
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)),
26         ))
27         db.send_create_signal(u'polls', ['PollItem'])
28
29
30     def backwards(self, orm):
31         # Deleting model 'Poll'
32         db.delete_table(u'polls_poll')
33
34         # Deleting model 'PollItem'
35         db.delete_table(u'polls_pollitem')
36
37
38     models = {
39         u'polls.poll': {
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'})
45         },
46         u'polls.pollitem': {
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'})
52         }
53     }
54
55     complete_apps = ['polls']