-# encoding: 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 'Poet'
- db.create_table('poetry_poet', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('name', self.gf('django.db.models.fields.CharField')(max_length=50)),
- ('path', self.gf('django.db.models.fields.CharField')(max_length=255)),
- ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=50, db_index=True)),
- ('author', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)),
- ('url', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
- ('description', self.gf('django.db.models.fields.TextField')(blank=True)),
- ('first_line_title', self.gf('django.db.models.fields.BooleanField')(default=False)),
- ('skip_first_lines', self.gf('django.db.models.fields.IntegerField')(default=0)),
- ))
- db.send_create_signal('poetry', ['Poet'])
-
- # Adding model 'Poem'
- db.create_table('poetry_poem', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('slug', self.gf('django.db.models.fields.SlugField')(max_length=50, db_index=True)),
- ('title', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
- ('text', self.gf('django.db.models.fields.TextField')()),
- ('poet', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['poetry.Poet'])),
- ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, db_index=True, blank=True)),
- ('seen_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
- ('view_count', self.gf('django.db.models.fields.IntegerField')(default=1)),
- ('for_contest', self.gf('django.db.models.fields.BooleanField')(default=False)),
- ('in_contest', self.gf('django.db.models.fields.BooleanField')(default=False)),
- ))
- db.send_create_signal('poetry', ['Poem'])
-
-
- def backwards(self, orm):
-
- # Deleting model 'Poet'
- db.delete_table('poetry_poet')
-
- # Deleting model 'Poem'
- db.delete_table('poetry_poem')
-
-
- models = {
- 'poetry.poem': {
- 'Meta': {'object_name': 'Poem'},
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'for_contest': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'in_contest': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'poet': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['poetry.Poet']"}),
- 'seen_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}),
- 'text': ('django.db.models.fields.TextField', [], {}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
- 'view_count': ('django.db.models.fields.IntegerField', [], {'default': '1'})
- },
- 'poetry.poet': {
- 'Meta': {'object_name': 'Poet'},
- 'author': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'first_line_title': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
- 'path': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'skip_first_lines': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
- 'url': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
- }
- }
-
- complete_apps = ['poetry']
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Poem',
+ fields=[
+ ('id', models.AutoField(verbose_name='ID', auto_created=True, serialize=False, primary_key=True)),
+ ('slug', models.SlugField()),
+ ('title', models.CharField(null=True, max_length=255, blank=True)),
+ ('text', models.TextField()),
+ ('created_at', models.DateTimeField(db_index=True, auto_now_add=True)),
+ ('seen_at', models.DateTimeField(auto_now_add=True)),
+ ('view_count', models.IntegerField(default=1)),
+ ('for_contest', models.BooleanField(default=False)),
+ ('in_contest', models.BooleanField(default=False)),
+ ],
+ options={
+ },
+ bases=(models.Model,),
+ ),
+ migrations.CreateModel(
+ name='Poet',
+ fields=[
+ ('id', models.AutoField(verbose_name='ID', auto_created=True, serialize=False, primary_key=True)),
+ ('name', models.CharField(max_length=50)),
+ ('path', models.CharField(max_length=255)),
+ ('slug', models.SlugField(unique=True)),
+ ('author', models.CharField(max_length=128, blank=True)),
+ ('url', models.CharField(max_length=255, blank=True)),
+ ('description', models.TextField(blank=True)),
+ ('first_line_title', models.BooleanField(default=False)),
+ ('skip_first_lines', models.IntegerField(default=0)),
+ ],
+ options={
+ },
+ bases=(models.Model,),
+ ),
+ migrations.AddField(
+ model_name='poem',
+ name='poet',
+ field=models.ForeignKey(to='poetry.Poet'),
+ preserve_default=True,
+ ),
+ ]