# 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 'Category' db.create_table('imagestore_category', ( ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ('parent', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='children', null=True, to=orm['imagestore.Category'])), ('slug', self.gf('django.db.models.fields.SlugField')(max_length=200, db_index=True)), ('title', self.gf('django.db.models.fields.CharField')(max_length=200)), ('order', self.gf('django.db.models.fields.IntegerField')()), ('is_public', self.gf('django.db.models.fields.BooleanField')(default=False)), ('lft', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), ('rght', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), ('tree_id', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), ('level', self.gf('django.db.models.fields.PositiveIntegerField')(db_index=True)), )) db.send_create_signal('imagestore', ['Category']) # Adding model 'Image' db.create_table('imagestore_image', ( ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ('slug', self.gf('django.db.models.fields.SlugField')(db_index=True, max_length=200, null=True, blank=True)), ('title', self.gf('django.db.models.fields.CharField')(max_length=200, null=True, blank=True)), ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), ('tags', self.gf('tagging.fields.TagField')()), ('category', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['imagestore.Category'])), ('order', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), ('is_public', self.gf('django.db.models.fields.BooleanField')(default=True)), ('image', self.gf('sorl.thumbnail.fields.ImageField')(max_length=100)), )) db.send_create_signal('imagestore', ['Image']) def backwards(self, orm): # Deleting model 'Category' db.delete_table('imagestore_category') # Deleting model 'Image' db.delete_table('imagestore_image') models = { 'imagestore.category': { 'Meta': {'object_name': 'Category'}, 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), 'order': ('django.db.models.fields.IntegerField', [], {}), 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['imagestore.Category']"}), 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '200', 'db_index': 'True'}), 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}) }, 'imagestore.image': { 'Meta': {'object_name': 'Image'}, 'category': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['imagestore.Category']"}), 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'image': ('sorl.thumbnail.fields.ImageField', [], {'max_length': '100'}), 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), 'slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '200', 'null': 'True', 'blank': 'True'}), 'tags': ('tagging.fields.TagField', [], {}), 'title': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}) } } complete_apps = ['imagestore']