Download this file

0001_initial.py    147 lines (133 with data), 9.0 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# -*- 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']