# -*- coding: utf-8 -*-
from south.utils import datetime_utils as 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 'Methodology'
db.create_table(u'methodology_methodology', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(max_length=200)),
('description', self.gf('django.db.models.fields.CharField')(max_length=2000, null=True, blank=True)),
('documentation', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
('active', self.gf('django.db.models.fields.BooleanField')(default=True)),
('entity', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['entity.Entity'])),
))
db.send_create_signal(u'methodology', ['Methodology'])
# Adding model 'MethodologyVersion'
db.create_table(u'methodology_methodologyversion', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('number', self.gf('django.db.models.fields.IntegerField')()),
('created', self.gf('django.db.models.fields.DateField')()),
('current', self.gf('django.db.models.fields.BooleanField')(default=False)),
('methodology', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['methodology.Methodology'])),
))
db.send_create_signal(u'methodology', ['MethodologyVersion'])
# Adding model 'Page'
db.create_table(u'methodology_page', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(max_length=200)),
('order', self.gf('django.db.models.fields.IntegerField')()),
('parent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['methodology.Page'], null=True, blank=True)),
('methodology_version', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['methodology.MethodologyVersion'], null=True, blank=True)),
))
db.send_create_signal(u'methodology', ['Page'])
# Adding model 'QuestionType'
db.create_table(u'methodology_questiontype', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(max_length=200)),
))
db.send_create_signal(u'methodology', ['QuestionType'])
# Adding model 'Question'
db.create_table(u'methodology_question', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('page', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['methodology.Page'])),
('text', self.gf('django.db.models.fields.CharField')(max_length=200)),
('order', self.gf('django.db.models.fields.IntegerField')()),
('eval_description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
('eval_value', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
('question_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['methodology.QuestionType'])),
))
db.send_create_signal(u'methodology', ['Question'])
# Adding model 'Query'
db.create_table(u'methodology_query', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('question', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['methodology.Question'])),
('eval_text', self.gf('django.db.models.fields.CharField')(max_length=2000)),
('eval_site', self.gf('django.db.models.fields.CharField')(max_length=2000)),
('eval_site_exclude', self.gf('django.db.models.fields.CharField')(max_length=2000)),
))
db.send_create_signal(u'methodology', ['Query'])
# Adding model 'Choice'
db.create_table(u'methodology_choice', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('question', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['methodology.Question'])),
('text', self.gf('django.db.models.fields.CharField')(max_length=200)),
('order', self.gf('django.db.models.fields.IntegerField')()),
('todo', self.gf('django.db.models.fields.CharField')(max_length=2000)),
))
db.send_create_signal(u'methodology', ['Choice'])
# Adding model 'WeightScenario'
db.create_table(u'methodology_weightscenario', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(max_length=200)),
('methodology_version', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['methodology.MethodologyVersion'])),
('active', self.gf('django.db.models.fields.BooleanField')()),
))
db.send_create_signal(u'methodology', ['WeightScenario'])
# Adding model 'Weight'
db.create_table(u'methodology_weight', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('question', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['methodology.Question'])),
('weight', self.gf('django.db.models.fields.FloatField')()),
('scenario', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['methodology.WeightScenario'])),
))
db.send_create_signal(u'methodology', ['Weight'])
def backwards(self, orm):
# Deleting model 'Methodology'
db.delete_table(u'methodology_methodology')
# Deleting model 'MethodologyVersion'
db.delete_table(u'methodology_methodologyversion')
# Deleting model 'Page'
db.delete_table(u'methodology_page')
# Deleting model 'QuestionType'
db.delete_table(u'methodology_questiontype')
# Deleting model 'Question'
db.delete_table(u'methodology_question')
# Deleting model 'Query'
db.delete_table(u'methodology_query')
# Deleting model 'Choice'
db.delete_table(u'methodology_choice')
# Deleting model 'WeightScenario'
db.delete_table(u'methodology_weightscenario')
# Deleting model 'Weight'
db.delete_table(u'methodology_weight')
models = {
u'entity.entity': {
'Meta': {'object_name': 'Entity'},
'actual_entity_app': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'actual_entity_class': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'})
},
u'methodology.choice': {
'Meta': {'ordering': "['order']", 'object_name': 'Choice'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'order': ('django.db.models.fields.IntegerField', [], {}),
'question': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['methodology.Question']"}),
'text': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'todo': ('django.db.models.fields.CharField', [], {'max_length': '2000'})
},
u'methodology.methodology': {
'Meta': {'object_name': 'Methodology'},
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'description': ('django.db.models.fields.CharField', [], {'max_length': '2000', 'null': 'True', 'blank': 'True'}),
'documentation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'entity': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['entity.Entity']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'})
},
u'methodology.methodologyversion': {
'Meta': {'object_name': 'MethodologyVersion'},
'created': ('django.db.models.fields.DateField', [], {}),
'current': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'methodology': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['methodology.Methodology']"}),
'number': ('django.db.models.fields.IntegerField', [], {})
},
u'methodology.page': {
'Meta': {'ordering': "['order']", 'object_name': 'Page'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'methodology_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['methodology.MethodologyVersion']", 'null': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'order': ('django.db.models.fields.IntegerField', [], {}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['methodology.Page']", 'null': 'True', 'blank': 'True'})
},
u'methodology.query': {
'Meta': {'object_name': 'Query'},
'eval_site': ('django.db.models.fields.CharField', [], {'max_length': '2000'}),
'eval_site_exclude': ('django.db.models.fields.CharField', [], {'max_length': '2000'}),
'eval_text': ('django.db.models.fields.CharField', [], {'max_length': '2000'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'question': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['methodology.Question']"})
},
u'methodology.question': {
'Meta': {'ordering': "['order']", 'object_name': 'Question'},
'eval_description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'eval_value': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'order': ('django.db.models.fields.IntegerField', [], {}),
'page': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['methodology.Page']"}),
'question_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['methodology.QuestionType']"}),
'text': ('django.db.models.fields.CharField', [], {'max_length': '200'})
},
u'methodology.questiontype': {
'Meta': {'object_name': 'QuestionType'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'})
},
u'methodology.weight': {
'Meta': {'object_name': 'Weight'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'question': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['methodology.Question']"}),
'scenario': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['methodology.WeightScenario']"}),
'weight': ('django.db.models.fields.FloatField', [], {})
},
u'methodology.weightscenario': {
'Meta': {'object_name': 'WeightScenario'},
'active': ('django.db.models.fields.BooleanField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'methodology_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['methodology.MethodologyVersion']"}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'})
}
}
complete_apps = ['methodology']