diff options
Diffstat (limited to 'app/books/migrations/0001_initial.py')
-rw-r--r-- | app/books/migrations/0001_initial.py | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/app/books/migrations/0001_initial.py b/app/books/migrations/0001_initial.py new file mode 100644 index 0000000..d272b11 --- /dev/null +++ b/app/books/migrations/0001_initial.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9 on 2016-02-08 10:41 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Book', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=200)), + ('author_name', models.CharField(max_length=200)), + ('slug', models.CharField(max_length=50)), + ('read_date', models.DateTimeField()), + ('isbn', models.CharField(blank=True, max_length=100, null=True)), + ('body_markdown', models.TextField(blank=True, null=True)), + ('body_html', models.TextField(blank=True, null=True)), + ('read_in', models.TextField(blank=True, null=True)), + ('url', models.CharField(blank=True, max_length=200, null=True)), + ('pages', models.CharField(blank=True, max_length=5, null=True)), + ('publish_date', models.CharField(blank=True, max_length=40, null=True)), + ('publish_place', models.CharField(blank=True, max_length=100, null=True)), + ('openlib_url', models.CharField(blank=True, max_length=400, null=True)), + ('rating', models.CharField(blank=True, choices=[('1', '1 Star'), ('2', '2 Stars'), ('3', '3 Stars'), ('4', '4 Stars'), ('5', '5 Stars')], max_length=1, null=True)), + ('enable_comments', models.BooleanField(default=False)), + ('image', models.FileField(blank=True, null=True, upload_to='/Users/sng/Sites/luxagraf/site/media/images/book-covers/')), + ], + options={ + 'ordering': ('-read_date',), + }, + ), + migrations.CreateModel( + name='BookHighlight', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('page', models.PositiveSmallIntegerField(null=True)), + ('location', models.CharField(blank=True, max_length=200, null=True)), + ('date_added', models.DateTimeField()), + ('body_markdown', models.TextField()), + ], + options={ + 'ordering': ('-date_added',), + }, + ), + migrations.CreateModel( + name='BookNote', + fields=[ + ('bookhighlight_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='books.BookHighlight')), + ], + bases=('books.bookhighlight',), + ), + migrations.AddField( + model_name='bookhighlight', + name='book', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='books.Book'), + ), + ] |