123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840 |
- # -*- coding: 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 'Item'
- db.create_table(
- "catalog_item",
- (
- ("id", self.gf("django.db.models.fields.AutoField")(primary_key=True)),
- (
- "created",
- self.gf("django.db.models.fields.DateTimeField")(
- auto_now_add=True, blank=True
- ),
- ),
- (
- "created_by",
- self.gf("django.db.models.fields.related.ForeignKey")(
- related_name="+", to=orm["auth.User"]
- ),
- ),
- (
- "last_updated",
- self.gf("django.db.models.fields.DateTimeField")(
- auto_now=True, auto_now_add=True, blank=True
- ),
- ),
- (
- "last_updated_by",
- self.gf("django.db.models.fields.related.ForeignKey")(
- related_name="+", to=orm["auth.User"]
- ),
- ),
- (
- "is_active",
- self.gf("django.db.models.fields.BooleanField")(default=True),
- ),
- ("title", self.gf("django.db.models.fields.CharField")(max_length=50)),
- (
- "description",
- self.gf("django.db.models.fields.CharField")(
- max_length=200, null=True, blank=True
- ),
- ),
- (
- "synopsis",
- self.gf("django.db.models.fields.CharField")(
- max_length=200, null=True, blank=True
- ),
- ),
- (
- "image",
- self.gf("sorl.thumbnail.fields.ImageField")(
- max_length=100, null=True, blank=True
- ),
- ),
- (
- "price",
- self.gf("django.db.models.fields.DecimalField")(
- max_digits=7, decimal_places=2
- ),
- ),
- (
- "shipping_cost",
- self.gf("django.db.models.fields.DecimalField")(
- max_digits=7, decimal_places=2
- ),
- ),
- (
- "shipping_cost_multiple",
- self.gf("django.db.models.fields.DecimalField")(
- max_digits=7, decimal_places=2
- ),
- ),
- (
- "subclass_type",
- self.gf("django.db.models.fields.CharField")(max_length=200),
- ),
- (
- "sku",
- self.gf("django.db.models.fields.SlugField")(
- unique=True, max_length=20
- ),
- ),
- (
- "deleted",
- self.gf("django.db.models.fields.BooleanField")(default=False),
- ),
- (
- "featured",
- self.gf("django.db.models.fields.BooleanField")(default=False),
- ),
- (
- "tax_free",
- self.gf("django.db.models.fields.BooleanField")(default=False),
- ),
- ),
- )
- db.send_create_signal("catalog", ["Item"])
- # Adding model 'Book'
- db.create_table(
- "catalog_book",
- (
- (
- "item_ptr",
- self.gf("django.db.models.fields.related.OneToOneField")(
- to=orm["catalog.Item"], unique=True, primary_key=True
- ),
- ),
- (
- "short_description",
- self.gf("django.db.models.fields.CharField")(
- max_length=100, null=True, blank=True
- ),
- ),
- (
- "authors",
- self.gf("django.db.models.fields.CharField")(
- max_length=200, null=True, blank=True
- ),
- ),
- (
- "illustrator",
- self.gf("django.db.models.fields.CharField")(
- max_length=200, null=True, blank=True
- ),
- ),
- (
- "publisher",
- self.gf("django.db.models.fields.CharField")(
- max_length=200, null=True, blank=True
- ),
- ),
- (
- "printer",
- self.gf("django.db.models.fields.CharField")(
- max_length=200, null=True, blank=True
- ),
- ),
- (
- "publish_date",
- self.gf("django.db.models.fields.CharField")(
- max_length=20, null=True, blank=True
- ),
- ),
- (
- "edition",
- self.gf("django.db.models.fields.CharField")(
- max_length=50, null=True, blank=True
- ),
- ),
- (
- "features",
- self.gf("django.db.models.fields.CharField")(
- max_length=100, null=True, blank=True
- ),
- ),
- (
- "dimensions",
- self.gf("django.db.models.fields.CharField")(
- max_length=20, null=True, blank=True
- ),
- ),
- (
- "pages",
- self.gf("django.db.models.fields.IntegerField")(
- null=True, blank=True
- ),
- ),
- (
- "isbn",
- self.gf("django.db.models.fields.CharField")(
- max_length=20, null=True, blank=True
- ),
- ),
- (
- "library_of_congress_number",
- self.gf("django.db.models.fields.CharField")(
- max_length=20, null=True, blank=True
- ),
- ),
- (
- "genre",
- self.gf("django.db.models.fields.CharField")(
- max_length=100, null=True, blank=True
- ),
- ),
- (
- "author_image",
- self.gf("sorl.thumbnail.fields.ImageField")(
- max_length=100, null=True, blank=True
- ),
- ),
- ),
- )
- db.send_create_signal("catalog", ["Book"])
- # Adding model 'Movie'
- db.create_table(
- "catalog_movie",
- (
- (
- "item_ptr",
- self.gf("django.db.models.fields.related.OneToOneField")(
- to=orm["catalog.Item"], unique=True, primary_key=True
- ),
- ),
- (
- "producer",
- self.gf("django.db.models.fields.CharField")(
- max_length=200, null=True, blank=True
- ),
- ),
- (
- "music",
- self.gf("django.db.models.fields.CharField")(
- max_length=200, null=True, blank=True
- ),
- ),
- (
- "runtime_minutes",
- self.gf("django.db.models.fields.IntegerField")(
- null=True, blank=True
- ),
- ),
- (
- "format",
- self.gf("django.db.models.fields.CharField")(
- max_length=20, null=True, blank=True
- ),
- ),
- (
- "region",
- self.gf("django.db.models.fields.CharField")(
- max_length=50, null=True, blank=True
- ),
- ),
- (
- "sound",
- self.gf("django.db.models.fields.CharField")(
- max_length=50, null=True, blank=True
- ),
- ),
- (
- "language",
- self.gf("django.db.models.fields.CharField")(
- max_length=50, null=True, blank=True
- ),
- ),
- (
- "captioning",
- self.gf("django.db.models.fields.CharField")(
- max_length=50, null=True, blank=True
- ),
- ),
- (
- "genre",
- self.gf("django.db.models.fields.CharField")(
- max_length=100, null=True, blank=True
- ),
- ),
- ),
- )
- db.send_create_signal("catalog", ["Movie"])
- # Adding model 'Map'
- db.create_table(
- "catalog_map",
- (
- (
- "item_ptr",
- self.gf("django.db.models.fields.related.OneToOneField")(
- to=orm["catalog.Item"], unique=True, primary_key=True
- ),
- ),
- (
- "dimensions",
- self.gf("django.db.models.fields.CharField")(
- max_length=20, null=True, blank=True
- ),
- ),
- (
- "full_image",
- self.gf("sorl.thumbnail.fields.ImageField")(
- max_length=100, null=True, blank=True
- ),
- ),
- ),
- )
- db.send_create_signal("catalog", ["Map"])
- # Adding model 'Subscription'
- db.create_table(
- "catalog_subscription",
- (
- (
- "item_ptr",
- self.gf("django.db.models.fields.related.OneToOneField")(
- to=orm["catalog.Item"], unique=True, primary_key=True
- ),
- ),
- (
- "shipping_type",
- self.gf("django.db.models.fields.CharField")(
- default="INSTATE", max_length=10
- ),
- ),
- (
- "shipping_method",
- self.gf("django.db.models.fields.CharField")(
- default=u"REGULAR", max_length=20
- ),
- ),
- ("duration", self.gf("django.db.models.fields.IntegerField")()),
- ),
- )
- db.send_create_signal("catalog", ["Subscription"])
- # Adding model 'ZipCode'
- db.create_table(
- "catalog_zipcode",
- (
- ("id", self.gf("django.db.models.fields.AutoField")(primary_key=True)),
- (
- "created",
- self.gf("django.db.models.fields.DateTimeField")(
- auto_now_add=True, blank=True
- ),
- ),
- (
- "created_by",
- self.gf("django.db.models.fields.related.ForeignKey")(
- related_name="+", to=orm["auth.User"]
- ),
- ),
- (
- "last_updated",
- self.gf("django.db.models.fields.DateTimeField")(
- auto_now=True, auto_now_add=True, blank=True
- ),
- ),
- (
- "last_updated_by",
- self.gf("django.db.models.fields.related.ForeignKey")(
- related_name="+", to=orm["auth.User"]
- ),
- ),
- (
- "is_active",
- self.gf("django.db.models.fields.BooleanField")(default=True),
- ),
- (
- "zipcode",
- self.gf("django.db.models.fields.CharField")(
- unique=True, max_length=9
- ),
- ),
- (
- "city",
- self.gf("django.db.models.fields.CharField")(
- max_length=64, null=True, blank=True
- ),
- ),
- (
- "state",
- self.gf("django.db.models.fields.CharField")(
- max_length=2, null=True, blank=True
- ),
- ),
- (
- "county",
- self.gf("django.db.models.fields.CharField")(
- max_length=64, null=True, blank=True
- ),
- ),
- (
- "deleted",
- self.gf("django.db.models.fields.BooleanField")(default=False),
- ),
- ),
- )
- db.send_create_signal("catalog", ["ZipCode"])
- def backwards(self, orm):
- # Deleting model 'Item'
- db.delete_table("catalog_item")
- # Deleting model 'Book'
- db.delete_table("catalog_book")
- # Deleting model 'Movie'
- db.delete_table("catalog_movie")
- # Deleting model 'Map'
- db.delete_table("catalog_map")
- # Deleting model 'Subscription'
- db.delete_table("catalog_subscription")
- # Deleting model 'ZipCode'
- db.delete_table("catalog_zipcode")
- models = {
- "auth.group": {
- "Meta": {"object_name": "Group"},
- "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
- "name": (
- "django.db.models.fields.CharField",
- [],
- {"unique": "True", "max_length": "80"},
- ),
- "permissions": (
- "django.db.models.fields.related.ManyToManyField",
- [],
- {
- "to": "orm['auth.Permission']",
- "symmetrical": "False",
- "blank": "True",
- },
- ),
- },
- "auth.permission": {
- "Meta": {
- "ordering": "('content_type__app_label', 'content_type__model', 'codename')",
- "unique_together": "(('content_type', 'codename'),)",
- "object_name": "Permission",
- },
- "codename": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "100"},
- ),
- "content_type": (
- "django.db.models.fields.related.ForeignKey",
- [],
- {"to": "orm['contenttypes.ContentType']"},
- ),
- "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
- "name": ("django.db.models.fields.CharField", [], {"max_length": "50"}),
- },
- "auth.user": {
- "Meta": {"object_name": "User"},
- "date_joined": (
- "django.db.models.fields.DateTimeField",
- [],
- {"default": "datetime.datetime.now"},
- ),
- "email": (
- "django.db.models.fields.EmailField",
- [],
- {"max_length": "75", "blank": "True"},
- ),
- "first_name": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "30", "blank": "True"},
- ),
- "groups": (
- "django.db.models.fields.related.ManyToManyField",
- [],
- {"to": "orm['auth.Group']", "symmetrical": "False", "blank": "True"},
- ),
- "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
- "is_active": (
- "django.db.models.fields.BooleanField",
- [],
- {"default": "True"},
- ),
- "is_staff": (
- "django.db.models.fields.BooleanField",
- [],
- {"default": "False"},
- ),
- "is_superuser": (
- "django.db.models.fields.BooleanField",
- [],
- {"default": "False"},
- ),
- "last_login": (
- "django.db.models.fields.DateTimeField",
- [],
- {"default": "datetime.datetime.now"},
- ),
- "last_name": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "30", "blank": "True"},
- ),
- "password": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "128"},
- ),
- "user_permissions": (
- "django.db.models.fields.related.ManyToManyField",
- [],
- {
- "to": "orm['auth.Permission']",
- "symmetrical": "False",
- "blank": "True",
- },
- ),
- "username": (
- "django.db.models.fields.CharField",
- [],
- {"unique": "True", "max_length": "30"},
- ),
- },
- "catalog.book": {
- "Meta": {"object_name": "Book", "_ormbases": ["catalog.Item"]},
- "author_image": (
- "sorl.thumbnail.fields.ImageField",
- [],
- {"max_length": "100", "null": "True", "blank": "True"},
- ),
- "authors": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "200", "null": "True", "blank": "True"},
- ),
- "dimensions": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "20", "null": "True", "blank": "True"},
- ),
- "edition": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "50", "null": "True", "blank": "True"},
- ),
- "features": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "100", "null": "True", "blank": "True"},
- ),
- "genre": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "100", "null": "True", "blank": "True"},
- ),
- "illustrator": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "200", "null": "True", "blank": "True"},
- ),
- "isbn": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "20", "null": "True", "blank": "True"},
- ),
- "item_ptr": (
- "django.db.models.fields.related.OneToOneField",
- [],
- {"to": "orm['catalog.Item']", "unique": "True", "primary_key": "True"},
- ),
- "library_of_congress_number": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "20", "null": "True", "blank": "True"},
- ),
- "pages": (
- "django.db.models.fields.IntegerField",
- [],
- {"null": "True", "blank": "True"},
- ),
- "printer": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "200", "null": "True", "blank": "True"},
- ),
- "publish_date": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "20", "null": "True", "blank": "True"},
- ),
- "publisher": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "200", "null": "True", "blank": "True"},
- ),
- "short_description": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "100", "null": "True", "blank": "True"},
- ),
- },
- "catalog.item": {
- "Meta": {"object_name": "Item"},
- "created": (
- "django.db.models.fields.DateTimeField",
- [],
- {"auto_now_add": "True", "blank": "True"},
- ),
- "created_by": (
- "django.db.models.fields.related.ForeignKey",
- [],
- {"related_name": "'+'", "to": "orm['auth.User']"},
- ),
- "deleted": (
- "django.db.models.fields.BooleanField",
- [],
- {"default": "False"},
- ),
- "description": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "200", "null": "True", "blank": "True"},
- ),
- "featured": (
- "django.db.models.fields.BooleanField",
- [],
- {"default": "False"},
- ),
- "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
- "image": (
- "sorl.thumbnail.fields.ImageField",
- [],
- {"max_length": "100", "null": "True", "blank": "True"},
- ),
- "is_active": (
- "django.db.models.fields.BooleanField",
- [],
- {"default": "True"},
- ),
- "last_updated": (
- "django.db.models.fields.DateTimeField",
- [],
- {"auto_now": "True", "auto_now_add": "True", "blank": "True"},
- ),
- "last_updated_by": (
- "django.db.models.fields.related.ForeignKey",
- [],
- {"related_name": "'+'", "to": "orm['auth.User']"},
- ),
- "price": (
- "django.db.models.fields.DecimalField",
- [],
- {"max_digits": "7", "decimal_places": "2"},
- ),
- "shipping_cost": (
- "django.db.models.fields.DecimalField",
- [],
- {"max_digits": "7", "decimal_places": "2"},
- ),
- "shipping_cost_multiple": (
- "django.db.models.fields.DecimalField",
- [],
- {"max_digits": "7", "decimal_places": "2"},
- ),
- "sku": (
- "django.db.models.fields.SlugField",
- [],
- {"unique": "True", "max_length": "20"},
- ),
- "subclass_type": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "200"},
- ),
- "synopsis": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "200", "null": "True", "blank": "True"},
- ),
- "tax_free": (
- "django.db.models.fields.BooleanField",
- [],
- {"default": "False"},
- ),
- "title": ("django.db.models.fields.CharField", [], {"max_length": "50"}),
- },
- "catalog.map": {
- "Meta": {"object_name": "Map", "_ormbases": ["catalog.Item"]},
- "dimensions": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "20", "null": "True", "blank": "True"},
- ),
- "full_image": (
- "sorl.thumbnail.fields.ImageField",
- [],
- {"max_length": "100", "null": "True", "blank": "True"},
- ),
- "item_ptr": (
- "django.db.models.fields.related.OneToOneField",
- [],
- {"to": "orm['catalog.Item']", "unique": "True", "primary_key": "True"},
- ),
- },
- "catalog.movie": {
- "Meta": {"object_name": "Movie", "_ormbases": ["catalog.Item"]},
- "captioning": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "50", "null": "True", "blank": "True"},
- ),
- "format": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "20", "null": "True", "blank": "True"},
- ),
- "genre": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "100", "null": "True", "blank": "True"},
- ),
- "item_ptr": (
- "django.db.models.fields.related.OneToOneField",
- [],
- {"to": "orm['catalog.Item']", "unique": "True", "primary_key": "True"},
- ),
- "language": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "50", "null": "True", "blank": "True"},
- ),
- "music": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "200", "null": "True", "blank": "True"},
- ),
- "producer": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "200", "null": "True", "blank": "True"},
- ),
- "region": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "50", "null": "True", "blank": "True"},
- ),
- "runtime_minutes": (
- "django.db.models.fields.IntegerField",
- [],
- {"null": "True", "blank": "True"},
- ),
- "sound": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "50", "null": "True", "blank": "True"},
- ),
- },
- "catalog.subscription": {
- "Meta": {"object_name": "Subscription", "_ormbases": ["catalog.Item"]},
- "duration": ("django.db.models.fields.IntegerField", [], {}),
- "item_ptr": (
- "django.db.models.fields.related.OneToOneField",
- [],
- {"to": "orm['catalog.Item']", "unique": "True", "primary_key": "True"},
- ),
- "shipping_method": (
- "django.db.models.fields.CharField",
- [],
- {"default": "u'REGULAR'", "max_length": "20"},
- ),
- "shipping_type": (
- "django.db.models.fields.CharField",
- [],
- {"default": "'INSTATE'", "max_length": "10"},
- ),
- },
- "catalog.zipcode": {
- "Meta": {"object_name": "ZipCode"},
- "city": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "64", "null": "True", "blank": "True"},
- ),
- "county": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "64", "null": "True", "blank": "True"},
- ),
- "created": (
- "django.db.models.fields.DateTimeField",
- [],
- {"auto_now_add": "True", "blank": "True"},
- ),
- "created_by": (
- "django.db.models.fields.related.ForeignKey",
- [],
- {"related_name": "'+'", "to": "orm['auth.User']"},
- ),
- "deleted": (
- "django.db.models.fields.BooleanField",
- [],
- {"default": "False"},
- ),
- "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
- "is_active": (
- "django.db.models.fields.BooleanField",
- [],
- {"default": "True"},
- ),
- "last_updated": (
- "django.db.models.fields.DateTimeField",
- [],
- {"auto_now": "True", "auto_now_add": "True", "blank": "True"},
- ),
- "last_updated_by": (
- "django.db.models.fields.related.ForeignKey",
- [],
- {"related_name": "'+'", "to": "orm['auth.User']"},
- ),
- "state": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "2", "null": "True", "blank": "True"},
- ),
- "zipcode": (
- "django.db.models.fields.CharField",
- [],
- {"unique": "True", "max_length": "9"},
- ),
- },
- "contenttypes.contenttype": {
- "Meta": {
- "ordering": "('name',)",
- "unique_together": "(('app_label', 'model'),)",
- "object_name": "ContentType",
- "db_table": "'django_content_type'",
- },
- "app_label": (
- "django.db.models.fields.CharField",
- [],
- {"max_length": "100"},
- ),
- "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
- "model": ("django.db.models.fields.CharField", [], {"max_length": "100"}),
- "name": ("django.db.models.fields.CharField", [], {"max_length": "100"}),
- },
- }
- complete_apps = ["catalog"]
|