add initial migration (savepoint)
This commit is contained in:
parent
ed16494900
commit
fb88bd9e84
181
rattail/django/rattail/migrations/0001_initial.py
Normal file
181
rattail/django/rattail/migrations/0001_initial.py
Normal file
|
@ -0,0 +1,181 @@
|
|||
# -*- 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 'PhoneNumber'
|
||||
db.create_table('rattail_phone_numbers', (
|
||||
('uuid', self.gf('rattail.django.rattail.models.core.UUIDField')(max_length=32, primary_key=True)),
|
||||
('parent_type', self.gf('django.db.models.fields.CharField')(max_length=20)),
|
||||
('parent_uuid', self.gf('django.db.models.fields.CharField')(max_length=32)),
|
||||
('preference', self.gf('django.db.models.fields.IntegerField')()),
|
||||
('type', self.gf('django.db.models.fields.CharField')(max_length=15, null=True, blank=True)),
|
||||
('number', self.gf('django.db.models.fields.CharField')(max_length=20)),
|
||||
))
|
||||
db.send_create_signal('rattail', ['PhoneNumber'])
|
||||
|
||||
# Adding model 'EmailAddress'
|
||||
db.create_table('rattail_email_addresses', (
|
||||
('uuid', self.gf('rattail.django.rattail.models.core.UUIDField')(max_length=32, primary_key=True)),
|
||||
('parent_type', self.gf('django.db.models.fields.CharField')(max_length=20)),
|
||||
('parent_uuid', self.gf('django.db.models.fields.CharField')(max_length=32)),
|
||||
('preference', self.gf('django.db.models.fields.IntegerField')()),
|
||||
('type', self.gf('django.db.models.fields.CharField')(max_length=15, null=True, blank=True)),
|
||||
('address', self.gf('django.db.models.fields.CharField')(max_length=255)),
|
||||
))
|
||||
db.send_create_signal('rattail', ['EmailAddress'])
|
||||
|
||||
# Adding model 'Store'
|
||||
db.create_table('rattail_stores', (
|
||||
('uuid', self.gf('rattail.django.rattail.models.core.UUIDField')(max_length=32, primary_key=True)),
|
||||
('id', self.gf('django.db.models.fields.CharField')(max_length=10, null=True, blank=True)),
|
||||
('name', self.gf('django.db.models.fields.CharField')(max_length=100, null=True, blank=True)),
|
||||
))
|
||||
db.send_create_signal('rattail', ['Store'])
|
||||
|
||||
# Adding model 'Department'
|
||||
db.create_table('rattail_departments', (
|
||||
('uuid', self.gf('rattail.django.rattail.models.core.UUIDField')(max_length=32, primary_key=True)),
|
||||
('number', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)),
|
||||
('name', self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True)),
|
||||
))
|
||||
db.send_create_signal('rattail', ['Department'])
|
||||
|
||||
# Adding model 'Subdepartment'
|
||||
db.create_table('rattail_subdepartments', (
|
||||
('uuid', self.gf('rattail.django.rattail.models.core.UUIDField')(max_length=32, primary_key=True)),
|
||||
('number', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)),
|
||||
('name', self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True)),
|
||||
('department', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['rattail.Department'], null=True, db_column='department_uuid', blank=True)),
|
||||
))
|
||||
db.send_create_signal('rattail', ['Subdepartment'])
|
||||
|
||||
# Adding model 'Category'
|
||||
db.create_table('rattail_categories', (
|
||||
('uuid', self.gf('rattail.django.rattail.models.core.UUIDField')(max_length=32, primary_key=True)),
|
||||
('number', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)),
|
||||
('name', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
|
||||
('department', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['rattail.Department'], null=True, db_column='department_uuid', blank=True)),
|
||||
))
|
||||
db.send_create_signal('rattail', ['Category'])
|
||||
|
||||
# Adding model 'Brand'
|
||||
db.create_table('rattail_brands', (
|
||||
('uuid', self.gf('rattail.django.rattail.models.core.UUIDField')(max_length=32, primary_key=True)),
|
||||
('name', self.gf('django.db.models.fields.CharField')(max_length=100, null=True, blank=True)),
|
||||
))
|
||||
db.send_create_signal('rattail', ['Brand'])
|
||||
|
||||
# Adding model 'Product'
|
||||
db.create_table('rattail_products', (
|
||||
('uuid', self.gf('rattail.django.rattail.models.core.UUIDField')(max_length=32, primary_key=True)),
|
||||
('upc', self.gf('rattail.django.rattail.models.rattail.GPCField')(db_index=True)),
|
||||
('department', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['rattail.Department'], null=True, db_column='department_uuid', blank=True)),
|
||||
('subdepartment', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['rattail.Subdepartment'], null=True, db_column='subdepartment_uuid', blank=True)),
|
||||
('category', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['rattail.Category'], null=True, db_column='category_uuid', blank=True)),
|
||||
('brand', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['rattail.Brand'], null=True, db_column='brand_uuid', blank=True)),
|
||||
('description', self.gf('django.db.models.fields.CharField')(max_length=60, null=True, blank=True)),
|
||||
('description2', self.gf('django.db.models.fields.CharField')(max_length=60, null=True, blank=True)),
|
||||
('size', self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True)),
|
||||
('unit_of_measure', self.gf('django.db.models.fields.CharField')(max_length=4, null=True, blank=True)),
|
||||
))
|
||||
db.send_create_signal('rattail', ['Product'])
|
||||
|
||||
|
||||
def backwards(self, orm):
|
||||
# Deleting model 'Product'
|
||||
db.delete_table('rattail_products')
|
||||
|
||||
# Deleting model 'Brand'
|
||||
db.delete_table('rattail_brands')
|
||||
|
||||
# Deleting model 'Category'
|
||||
db.delete_table('rattail_categories')
|
||||
|
||||
# Deleting model 'Subdepartment'
|
||||
db.delete_table('rattail_subdepartments')
|
||||
|
||||
# Deleting model 'Department'
|
||||
db.delete_table('rattail_departments')
|
||||
|
||||
# Deleting model 'Store'
|
||||
db.delete_table('rattail_stores')
|
||||
|
||||
# Deleting model 'EmailAddress'
|
||||
db.delete_table('rattail_email_addresses')
|
||||
|
||||
# Deleting model 'PhoneNumber'
|
||||
db.delete_table('rattail_phone_numbers')
|
||||
|
||||
|
||||
models = {
|
||||
'rattail.phonenumber': {
|
||||
'Meta': {'object_name': 'PhoneNumber', 'db_table': "'rattail_phone_numbers'"},
|
||||
'number': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
|
||||
'parent_type': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
|
||||
'parent_uuid': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
|
||||
'preference': ('django.db.models.fields.IntegerField', [], {}),
|
||||
'type': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
|
||||
'uuid': ('rattail.django.rattail.models.core.UUIDField', [], {'max_length': '32', 'primary_key': 'True'})
|
||||
},
|
||||
'rattail.emailaddress': {
|
||||
'Meta': {'object_name': 'EmailAddress', 'db_table': "'rattail_email_addresses'"},
|
||||
'address': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
|
||||
'parent_type': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
|
||||
'parent_uuid': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
|
||||
'preference': ('django.db.models.fields.IntegerField', [], {}),
|
||||
'type': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
|
||||
'uuid': ('rattail.django.rattail.models.core.UUIDField', [], {'max_length': '32', 'primary_key': 'True'})
|
||||
},
|
||||
'rattail.store': {
|
||||
'Meta': {'object_name': 'Store', 'db_table': "'rattail_stores'"},
|
||||
'id': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
|
||||
'uuid': ('rattail.django.rattail.models.core.UUIDField', [], {'max_length': '32', 'primary_key': 'True'})
|
||||
},
|
||||
'rattail.department': {
|
||||
'Meta': {'object_name': 'Department', 'db_table': "'rattail_departments'"},
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
|
||||
'number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
|
||||
'uuid': ('rattail.django.rattail.models.core.UUIDField', [], {'max_length': '32', 'primary_key': 'True'})
|
||||
},
|
||||
'rattail.subdepartment': {
|
||||
'Meta': {'object_name': 'Subdepartment', 'db_table': "'rattail_subdepartments'"},
|
||||
'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['rattail.Department']", 'null': 'True', 'db_column': "'department_uuid'", 'blank': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
|
||||
'number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
|
||||
'uuid': ('rattail.django.rattail.models.core.UUIDField', [], {'max_length': '32', 'primary_key': 'True'})
|
||||
},
|
||||
'rattail.category': {
|
||||
'Meta': {'object_name': 'Category', 'db_table': "'rattail_categories'"},
|
||||
'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['rattail.Department']", 'null': 'True', 'db_column': "'department_uuid'", 'blank': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
|
||||
'number': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
|
||||
'uuid': ('rattail.django.rattail.models.core.UUIDField', [], {'max_length': '32', 'primary_key': 'True'})
|
||||
},
|
||||
'rattail.brand': {
|
||||
'Meta': {'object_name': 'Brand', 'db_table': "'rattail_brands'"},
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
|
||||
'uuid': ('rattail.django.rattail.models.core.UUIDField', [], {'max_length': '32', 'primary_key': 'True'})
|
||||
},
|
||||
'rattail.product': {
|
||||
'Meta': {'object_name': 'Product', 'db_table': "'rattail_products'"},
|
||||
'brand': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['rattail.Brand']", 'null': 'True', 'db_column': "'brand_uuid'", 'blank': 'True'}),
|
||||
'category': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['rattail.Category']", 'null': 'True', 'db_column': "'category_uuid'", 'blank': 'True'}),
|
||||
'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['rattail.Department']", 'null': 'True', 'db_column': "'department_uuid'", 'blank': 'True'}),
|
||||
'description': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}),
|
||||
'description2': ('django.db.models.fields.CharField', [], {'max_length': '60', 'null': 'True', 'blank': 'True'}),
|
||||
'size': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
|
||||
'subdepartment': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['rattail.Subdepartment']", 'null': 'True', 'db_column': "'subdepartment_uuid'", 'blank': 'True'}),
|
||||
'unit_of_measure': ('django.db.models.fields.CharField', [], {'max_length': '4', 'null': 'True', 'blank': 'True'}),
|
||||
'upc': ('rattail.django.rattail.models.rattail.GPCField', [], {'db_index': 'True'}),
|
||||
'uuid': ('rattail.django.rattail.models.core.UUIDField', [], {'max_length': '32', 'primary_key': 'True'})
|
||||
},
|
||||
}
|
||||
|
||||
complete_apps = ['rattail']
|
0
rattail/django/rattail/migrations/__init__.py
Normal file
0
rattail/django/rattail/migrations/__init__.py
Normal file
|
@ -28,5 +28,12 @@
|
|||
|
||||
from __future__ import absolute_import
|
||||
|
||||
from south.modelsinspector import add_introspection_rules
|
||||
|
||||
from rattail.django.rattail.models.core import *
|
||||
from rattail.django.rattail.models.rattail import *
|
||||
|
||||
|
||||
add_introspection_rules([], [r'^rattail\.django\.rattail\.models\.core\.UUIDField'])
|
||||
|
||||
add_introspection_rules([], [r'^rattail\.django\.rattail\.models\.rattail\.GPCField'])
|
||||
|
|
Loading…
Reference in a new issue