3 from south.db import db
4 from south.v2 import SchemaMigration
5 from django.db import models
7 class Migration(SchemaMigration):
9 def forwards(self, orm):
12 db.create_table('lesmianator_poem', (
13 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14 ('slug', self.gf('django.db.models.fields.SlugField')(max_length=120, db_index=True)),
15 ('text', self.gf('django.db.models.fields.TextField')()),
16 ('created_by', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True)),
17 ('created_from', self.gf('jsonfield.fields.JSONField')(null=True, blank=True)),
18 ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
19 ('seen_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
20 ('view_count', self.gf('django.db.models.fields.IntegerField')(default=1)),
22 db.send_create_signal('lesmianator', ['Poem'])
24 # Adding model 'Continuations'
25 db.create_table('lesmianator_continuations', (
26 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
27 ('pickle', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
28 ('content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'])),
29 ('object_id', self.gf('django.db.models.fields.PositiveIntegerField')()),
31 db.send_create_signal('lesmianator', ['Continuations'])
33 # Adding unique constraint on 'Continuations', fields ['content_type', 'object_id']
34 db.create_unique('lesmianator_continuations', ['content_type_id', 'object_id'])
37 def backwards(self, orm):
39 # Removing unique constraint on 'Continuations', fields ['content_type', 'object_id']
40 db.delete_unique('lesmianator_continuations', ['content_type_id', 'object_id'])
42 # Deleting model 'Poem'
43 db.delete_table('lesmianator_poem')
45 # Deleting model 'Continuations'
46 db.delete_table('lesmianator_continuations')
51 'Meta': {'object_name': 'Group'},
52 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
53 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
54 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
57 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
58 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
59 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
60 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
61 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
64 'Meta': {'object_name': 'User'},
65 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
66 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
67 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
68 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
69 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
70 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
71 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
72 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
73 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
74 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
75 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
76 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
77 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
79 'contenttypes.contenttype': {
80 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
81 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
82 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
83 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
84 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
86 'lesmianator.continuations': {
87 'Meta': {'unique_together': "(('content_type', 'object_id'),)", 'object_name': 'Continuations'},
88 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
89 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
90 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
91 'pickle': ('django.db.models.fields.files.FileField', [], {'max_length': '100'})
94 'Meta': {'object_name': 'Poem'},
95 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
96 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}),
97 'created_from': ('jsonfield.fields.JSONField', [], {'null': 'True', 'blank': 'True'}),
98 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
99 'seen_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
100 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
101 'text': ('django.db.models.fields.TextField', [], {}),
102 'view_count': ('django.db.models.fields.IntegerField', [], {'default': '1'})
106 complete_apps = ['lesmianator']