# -*- 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 'OSProject'
db.create_table(u'OSProject_osproject', (
('name', self.gf('django.db.models.fields.CharField')(max_length=200)),
('instance', self.gf('django.db.models.fields.related.OneToOneField')(related_name='actual_instance', unique=True, primary_key=True, to=orm['analysis.Instance'])),
))
db.send_create_signal(u'OSProject', ['OSProject'])
# Adding model 'Forge'
db.create_table(u'OSProject_forge', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(max_length=50)),
('url', self.gf('django.db.models.fields.CharField')(max_length=200)),
))
db.send_create_signal(u'OSProject', ['Forge'])
# Adding model 'OSProjectForge'
db.create_table(u'OSProject_osprojectforge', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(max_length=200)),
('forge', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['OSProject.Forge'])),
('os_project', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['OSProject.OSProject'])),
('identifier_in_forge', self.gf('django.db.models.fields.CharField')(max_length=200)),
('datasource_id', self.gf('django.db.models.fields.IntegerField')()),
))
db.send_create_signal(u'OSProject', ['OSProjectForge'])
# Adding model 'OSSConfiguration'
db.create_table(u'OSProject_ossconfiguration', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('flossmole_locale', self.gf('django.db.models.fields.BooleanField')()),
('ohloh_api_key', self.gf('django.db.models.fields.CharField')(max_length=100)),
('local_record_limit', self.gf('django.db.models.fields.IntegerField')()),
('remote_record_limit', self.gf('django.db.models.fields.IntegerField')()),
('ohloh_record_limit', self.gf('django.db.models.fields.IntegerField')()),
))
db.send_create_signal(u'OSProject', ['OSSConfiguration'])
def backwards(self, orm):
# Deleting model 'OSProject'
db.delete_table(u'OSProject_osproject')
# Deleting model 'Forge'
db.delete_table(u'OSProject_forge')
# Deleting model 'OSProjectForge'
db.delete_table(u'OSProject_osprojectforge')
# Deleting model 'OSSConfiguration'
db.delete_table(u'OSProject_ossconfiguration')
models = {
u'OSProject.forge': {
'Meta': {'object_name': 'Forge'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'os_projects': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['OSProject.OSProject']", 'symmetrical': 'False', 'through': u"orm['OSProject.OSProjectForge']", 'blank': 'True'}),
'url': ('django.db.models.fields.CharField', [], {'max_length': '200'})
},
u'OSProject.osproject': {
'Meta': {'object_name': 'OSProject'},
'instance': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'actual_instance'", 'unique': 'True', 'primary_key': 'True', 'to': u"orm['analysis.Instance']"}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'})
},
u'OSProject.osprojectforge': {
'Meta': {'object_name': 'OSProjectForge'},
'datasource_id': ('django.db.models.fields.IntegerField', [], {}),
'forge': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['OSProject.Forge']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'identifier_in_forge': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'os_project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['OSProject.OSProject']"})
},
u'OSProject.ossconfiguration': {
'Meta': {'object_name': 'OSSConfiguration'},
'flossmole_locale': ('django.db.models.fields.BooleanField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'local_record_limit': ('django.db.models.fields.IntegerField', [], {}),
'ohloh_api_key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'ohloh_record_limit': ('django.db.models.fields.IntegerField', [], {}),
'remote_record_limit': ('django.db.models.fields.IntegerField', [], {})
},
u'analysis.analysis': {
'Meta': {'object_name': 'Analysis'},
'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'created': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
'description': ('django.db.models.fields.CharField', [], {'max_length': '2000'}),
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'}),
'protected': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'user_login': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'weight_scenario': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['methodology.WeightScenario']"})
},
u'analysis.instance': {
'Meta': {'object_name': 'Instance'},
'analysis': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['analysis.Analysis']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'name_for_search': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '200'})
},
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.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.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 = ['OSProject']