class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name='Category', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('category', models.CharField(max_length=30)), ('created', models.DateTimeField(auto_now_add=True)), ('updated', models.DateTimeField(auto_now=True)), ], ), migrations.CreateModel( name='Book', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=50)), ('year', models.CharField(max_length=5)), ('author', models.CharField(max_length=50)), ('about', models.TextField()), ('cost', models.PositiveIntegerField()), ('page_number', models.PositiveIntegerField()), ('isbn_number', models.CharField(max_length=50)), ('image', models.FileField(blank=True, null=True, upload_to=book.models.store_image)), ('file', models.FileField(blank=True, null=True, upload_to=book.models.store_file)), ('free', models.BooleanField(blank=True, default=False, null=True)), ('is_new', models.BooleanField(default=True)), ('created', models.DateTimeField(auto_now_add=True)), ('updated', models.DateTimeField(auto_now=True)), ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='book.Category')), ], ), ]
class Migration(migrations.Migration): dependencies = [ ('book', '0011_auto_20190810_1005'), ] operations = [ migrations.AlterField( model_name='book', name='image', field=models.FileField(blank=True, null=True, upload_to=book.models.UploadToPathAndRename('public_html/books')), ), ]
class Migration(migrations.Migration): dependencies = [ ('book', '0005_auto_20190927_1106'), ] operations = [ migrations.AlterField( model_name='images', name='picture', field=models.FileField( upload_to='documents/%Y/%m/%d', validators=[book.models.validate_file_extension]), ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('app', '0001_initial'), ('taggit', '0002_auto_20150616_2121'), ] operations = [ migrations.CreateModel( name='Book', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('code', models.CharField(max_length=10)), ('name', models.CharField(max_length=100)), ('title', models.CharField(blank=True, max_length=150, null=True)), ('slug', models.SlugField(blank=True, max_length=150, null=True)), ('option', models.CharField(blank=True, max_length=150, null=True)), ('preview', models.TextField(blank=True, null=True)), ('pages', models.IntegerField(default=0)), ('year', models.IntegerField(default=0)), ('price', models.DecimalField(decimal_places=2, default=0, max_digits=15)), ('price_ebook', models.DecimalField(decimal_places=2, default=0, max_digits=15)), ('sample', models.FileField(blank=True, null=True, upload_to=book.models.get_book_sample)), ('image', models.FileField(blank=True, null=True, upload_to=book.models.get_book_image)), ('published', models.BooleanField(default=True)), ('created', models.DateTimeField(auto_now_add=True)), ('updated', models.DateTimeField(auto_now=True)), ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.Category')), ('tags', taggit.managers.TaggableManager( blank=True, help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')), ('teacher', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.Teacher')), ], options={ 'db_table': 'book', 'verbose_name_plural': 'Book', }, ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('pages', '__first__'), ] operations = [ migrations.CreateModel( name='Asset', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('visual_artist', models.CharField(max_length=256)), ('animator', models.CharField(blank=True, max_length=256, null=True)), ('composer', models.CharField(blank=True, max_length=256, null=True)), ('locus', models.PositiveSmallIntegerField(default=0)), ('slug', models.SlugField(blank=True, editable=False)), ('created', models.DateTimeField(auto_now_add=True)), ('modified', models.DateTimeField(auto_now=True)), ('type', models.CharField(choices=[('AUD', 'audio'), ('VID', 'video'), ('IMG', 'image'), ('IMA', 'image and audio'), ('TXA', 'text and audio')], max_length=3)), ('file', models.FileField( blank=True, null=True, upload_to=book.models.book_media_upload_handler)), ], ), migrations.CreateModel( name='Book', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=256)), ('slug', models.SlugField(blank=True, editable=False)), ('cover', models.ImageField( default='default_cover.jpg', upload_to=book.models.cover_media_upload_handler)), ('author', models.CharField(max_length=256)), ('publisher', models.CharField(max_length=256)), ('pub_date', models.CharField(blank=True, max_length=64, null=True)), ('copyright', models.CharField(blank=True, max_length=64, null=True)), ('isbn', models.CharField(blank=True, max_length=17, null=True)), ('reading_level', models.CharField(blank=True, max_length=32, null=True)), ('word_count', models.CharField(blank=True, max_length=5, null=True)), ('created', models.DateTimeField(auto_now_add=True)), ('modified', models.DateTimeField(auto_now=True)), ('webpage', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='books', to='pages.Page')), ], ), migrations.CreateModel( name='BookPage', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('slug', models.SlugField(blank=True, editable=False)), ('type', models.CharField(choices=[('BPG', 'book pages'), ('GPG', 'game pages'), ('DPG', 'dashboard pages')], max_length=3)), ('name', models.CharField(blank=True, max_length=245, null=True)), ('is_title_page', models.BooleanField(default=False)), ('page_order', models.PositiveSmallIntegerField(blank=True, null=True)), ('headline', models.TextField()), ('created', models.DateTimeField(auto_now_add=True)), ('modified', models.DateTimeField(auto_now=True)), ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pages', to='book.Book')), ], ), migrations.CreateModel( name='Line', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('order', models.PositiveSmallIntegerField()), ('audio', models.FileField( blank=True, null=True, upload_to=book.models.book_media_upload_handler)), ('page', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lines', to='book.BookPage')), ], ), migrations.CreateModel( name='Word', fields=[ ('asset_ptr', models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='book.Asset')), ('text', models.CharField(blank=True, max_length=256, null=True)), ('audio', models.FileField( blank=True, null=True, upload_to=book.models.book_media_upload_handler)), ('length', models.PositiveSmallIntegerField()), ('line', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='words', to='book.Line')), ], bases=('book.asset', ), ), migrations.AddField( model_name='asset', name='bookpage', field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name='assets', to='book.BookPage'), ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('book', '0001_initial'), ] operations = [ migrations.CreateModel( name='Book', fields=[ ('book_id', models.AutoField(primary_key=True, serialize=False)), ('name', models.CharField(max_length=20)), ('category', models.CharField(max_length=20)), ('publisher', models.CharField(max_length=15)), ('author', models.CharField(max_length=30)), ('origin_price', models.FloatField( max_length=6, validators=[book.validators.validate_not_negative_number ])), ('stock', models.IntegerField( default=0, validators=[book.validators.validate_not_negative_number ])), ('discount', models.DecimalField( decimal_places=2, default=1, max_digits=2, max_length=3, validators=[book.validators.validate_discount])), ('sale_number', models.IntegerField( default=0, validators=[book.validators.validate_not_negative_number ])), ('is_on_sale', models.BooleanField(default=True)), ('putaway_date', models.DateTimeField(auto_now_add=True)), ], ), migrations.CreateModel( name='BookDetail', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('cover', models.ImageField(default='img/cover/default.jpg', null=True, upload_to=book.models.get_book_file_path)), ('catalogue', models.FileField(null=True, upload_to=book.models.get_book_file_path)), ('summary', models.FileField(null=True, upload_to=book.models.get_book_file_path)), ('book', models.OneToOneField( on_delete=django.db.models.deletion.CASCADE, to='book.Book')), ], ), ]
class Migration(migrations.Migration): dependencies = [ ("book", "0006_auto_20190622_2126"), ] operations = [ migrations.CreateModel( name="BookStyle", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ( "title", models.CharField( default="Default", help_text="The human readable title.", max_length=128, ), ), ( "slug", models.SlugField( default="default", help_text="The base of the filenames the style occupies.", max_length=20, unique=True, ), ), ( "contents", models.TextField( default="", help_text="The CSS style definiton." ), ), ], ), migrations.CreateModel( name="BookStyleFile", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ( "file", models.FileField( help_text="A file references in the style. The filename will be replaced with the final url of the file in the style.", upload_to=book.models.bookstylefile_location, ), ), ( "filename", models.CharField( help_text="The original filename.", max_length=255 ), ), ( "style", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, to="book.BookStyle", ), ), ], options={ "unique_together": {("filename", "style")}, }, ), migrations.RunPython(load_fixture, reverse_code=unload_fixture), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('taggit', '0002_auto_20150616_2121'), ('app', '0001_initial'), ] operations = [ migrations.CreateModel( name='Book', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('code', models.CharField(max_length=10)), ('name', models.CharField(max_length=100)), ('slug', models.SlugField(blank=True, max_length=250, null=True)), ('title', models.CharField(blank=True, max_length=100, null=True)), ('preview', models.TextField(blank=True, null=True)), ('type', models.CharField(choices=[(b'B', b'Both'), (b'E', b'e-Book'), (b'P', b'Paperback')], max_length=1)), ('pages', models.IntegerField(default=0)), ('years', models.IntegerField(default=0)), ('qty', models.IntegerField(default=0)), ('price', models.DecimalField(decimal_places=2, default=0, max_digits=15)), ('price_ebook', models.DecimalField(decimal_places=2, default=0, max_digits=15)), ('example', models.FileField(blank=True, null=True, upload_to=book.models.get_book_exam_file)), ('image', models.FileField(blank=True, null=True, upload_to=book.models.get_book_file)), ('published', models.BooleanField(default=True)), ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.Category')), ('tags', taggit.managers.TaggableManager( help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')), ('teacher', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.Teacher')), ], options={ 'db_table': 'book', 'verbose_name_plural': 'Book', }, ), migrations.CreateModel( name='BookOption', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('option', models.CharField(max_length=50)), ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='book.Book')), ], options={ 'db_table': 'book_option', 'verbose_name_plural': 'BookOption', }, ), migrations.CreateModel( name='Register', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=100)), ('phone', models.CharField(max_length=20)), ('email', models.EmailField(max_length=100)), ('reg_date', models.DateTimeField(auto_now_add=True, null=True)), ('paid', models.BooleanField(default=False)), ('paid_date', models.DateTimeField(blank=True, null=True)), ('paid_via', models.CharField(blank=True, max_length=50, null=True)), ('delivered', models.BooleanField(default=False)), ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='book.Book')), ], options={ 'ordering': ['reg_date'], 'db_table': 'book_register', 'verbose_name_plural': 'Register', }, ), ]
class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Book', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), ('title', models.CharField(max_length=250, verbose_name='title')), ('description', models.TextField(blank=True, verbose_name='description')), ('thumbnail', easy_thumbnails.fields.ThumbnailerImageField(blank=True, upload_to=book.models.upload_directory_path, verbose_name='thumbnail')), ('status', models.IntegerField(choices=[(0, 'public'), (1, 'private')], db_index=True, default=0, verbose_name='status')), ('license', models.IntegerField(choices=[(0, 'BY'), (1, 'BY-SA'), (2, 'BY-ND'), (3, 'BY-NC'), (4, 'BY-NC-SA'), (5, 'BY-NC-ND')], db_index=True, default=0, verbose_name='license')), ('view_count', models.PositiveIntegerField(default=0, verbose_name='view count')), ('updated', models.DateTimeField(null=True, verbose_name='updated date')), ], options={ 'verbose_name': 'book', 'verbose_name_plural': 'books', }, ), migrations.CreateModel( name='Page', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), ('title', models.CharField(help_text="The page title as you'd like it to be seen by the public", max_length=255, verbose_name='title')), ('description', models.CharField(blank=True, help_text="A short description not longer than 155 characters. Don't use double quotes.", max_length=255, verbose_name='description')), ('keywords', models.CharField(blank=True, help_text="A comma-separated list of keywords. Don't use double quotes.", max_length=255, verbose_name='keywords')), ('content', models.TextField(verbose_name='content')), ('status', models.IntegerField(choices=[(0, 'draft'), (1, 'public'), (2, 'private')], db_index=True, default=1, verbose_name='status')), ('view_count', models.PositiveIntegerField(default=0, verbose_name='view count')), ('ip_address', models.GenericIPAddressField(verbose_name='IP address')), ('updated', models.DateTimeField(null=True, verbose_name='updated date')), ('lft', models.PositiveIntegerField(editable=False)), ('rght', models.PositiveIntegerField(editable=False)), ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)), ('level', models.PositiveIntegerField(editable=False)), ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pages', to='book.Book', verbose_name='book')), ('owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='book_page_owned', to=settings.AUTH_USER_MODEL, verbose_name='owner')), ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='children', to='book.Page', verbose_name='parent')), ], options={ 'verbose_name': 'page', 'verbose_name_plural': 'pages', }, ), migrations.CreateModel( name='Feedback', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), ('email', models.EmailField(max_length=254, verbose_name='email address')), ('content', models.TextField(verbose_name='content')), ('page', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='feedback', to='book.Page', verbose_name='page')), ], options={ 'verbose_name': 'feedback', 'verbose_name_plural': 'feedback', }, ), migrations.CreateModel( name='Category', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), ('title', models.CharField(max_length=128, verbose_name='title')), ('slug', models.SlugField(allow_unicode=True, help_text='A short label containing only letters, numbers, underscores or hyphens for URL', max_length=255, unique=True, verbose_name='slug')), ('lft', models.PositiveIntegerField(editable=False)), ('rght', models.PositiveIntegerField(editable=False)), ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)), ('level', models.PositiveIntegerField(editable=False)), ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='children', to='book.Category', verbose_name='parent')), ], options={ 'verbose_name': 'category', 'verbose_name_plural': 'categories', }, ), migrations.AddField( model_name='book', name='category', field=mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='book.Category', verbose_name='category'), ), migrations.AddField( model_name='book', name='owner', field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='book_book_owned', to=settings.AUTH_USER_MODEL, verbose_name='owner'), ), migrations.CreateModel( name='Attachment', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(blank=True, max_length=255, null=True, verbose_name='file name')), ('uid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True, verbose_name='public identifier')), ('created', models.DateTimeField(auto_now_add=True, verbose_name='created time')), ('file', models.FileField(upload_to=book.models.upload_directory_path, verbose_name='uploaded file')), ('page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='attachments', to='book.Page', verbose_name='page')), ], options={ 'verbose_name': 'attachment', 'verbose_name_plural': 'attachments', }, ), ]