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('poetry_poet', (
13 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14 ('name', self.gf('django.db.models.fields.CharField')(max_length=50)),
15 ('path', self.gf('django.db.models.fields.CharField')(max_length=255)),
16 ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=50, db_index=True)),
17 ('author', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)),
18 ('url', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
19 ('description', self.gf('django.db.models.fields.TextField')(blank=True)),
20 ('first_line_title', self.gf('django.db.models.fields.BooleanField')(default=False)),
21 ('skip_first_lines', self.gf('django.db.models.fields.IntegerField')(default=0)),
23 db.send_create_signal('poetry', ['Poet'])
26 db.create_table('poetry_poem', (
27 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
28 ('slug', self.gf('django.db.models.fields.SlugField')(max_length=50, db_index=True)),
29 ('title', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
30 ('text', self.gf('django.db.models.fields.TextField')()),
31 ('poet', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['poetry.Poet'])),
32 ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, db_index=True, blank=True)),
33 ('seen_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
34 ('view_count', self.gf('django.db.models.fields.IntegerField')(default=1)),
35 ('for_contest', self.gf('django.db.models.fields.BooleanField')(default=False)),
36 ('in_contest', self.gf('django.db.models.fields.BooleanField')(default=False)),
38 db.send_create_signal('poetry', ['Poem'])
41 def backwards(self, orm):
43 # Deleting model 'Poet'
44 db.delete_table('poetry_poet')
46 # Deleting model 'Poem'
47 db.delete_table('poetry_poem')
52 'Meta': {'object_name': 'Poem'},
53 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
54 'for_contest': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
55 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
56 'in_contest': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
57 'poet': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['poetry.Poet']"}),
58 'seen_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
59 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}),
60 'text': ('django.db.models.fields.TextField', [], {}),
61 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
62 'view_count': ('django.db.models.fields.IntegerField', [], {'default': '1'})
65 'Meta': {'object_name': 'Poet'},
66 'author': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
67 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
68 'first_line_title': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
69 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
70 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
71 'path': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
72 'skip_first_lines': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
73 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
74 'url': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
78 complete_apps = ['poetry']