зеркало из https://github.com/mozilla/treeherder.git
add reference_data_signature to models and reset db migrations
This commit is contained in:
Родитель
64bce0bcfa
Коммит
f03c928b78
|
@ -1,366 +0,0 @@
|
|||
# -*- 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 'Product'
|
||||
db.create_table(u'product', (
|
||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('name', self.gf('django.db.models.fields.CharField')(max_length=50L)),
|
||||
('description', self.gf('django.db.models.fields.TextField')(default=u'fill me', blank=True)),
|
||||
('active_status', self.gf('django.db.models.fields.CharField')(default=u'active', max_length=7L, blank=True)),
|
||||
))
|
||||
db.send_create_signal(u'model', ['Product'])
|
||||
|
||||
# Adding model 'BuildPlatform'
|
||||
db.create_table(u'build_platform', (
|
||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('os_name', self.gf('django.db.models.fields.CharField')(max_length=25L)),
|
||||
('platform', self.gf('django.db.models.fields.CharField')(max_length=25L)),
|
||||
('architecture', self.gf('django.db.models.fields.CharField')(max_length=25L, blank=True)),
|
||||
('active_status', self.gf('django.db.models.fields.CharField')(default=u'active', max_length=7L, blank=True)),
|
||||
))
|
||||
db.send_create_signal(u'model', ['BuildPlatform'])
|
||||
|
||||
# Adding model 'Option'
|
||||
db.create_table(u'option', (
|
||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('name', self.gf('django.db.models.fields.CharField')(max_length=50L)),
|
||||
('description', self.gf('django.db.models.fields.TextField')(default=u'fill me', blank=True)),
|
||||
('active_status', self.gf('django.db.models.fields.CharField')(default=u'active', max_length=7L, blank=True)),
|
||||
))
|
||||
db.send_create_signal(u'model', ['Option'])
|
||||
|
||||
# Adding model 'RepositoryGroup'
|
||||
db.create_table(u'repository_group', (
|
||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('name', self.gf('django.db.models.fields.CharField')(max_length=50L)),
|
||||
('description', self.gf('django.db.models.fields.TextField')(default=u'fill me', blank=True)),
|
||||
('active_status', self.gf('django.db.models.fields.CharField')(default=u'active', max_length=7L, blank=True)),
|
||||
))
|
||||
db.send_create_signal(u'model', ['RepositoryGroup'])
|
||||
|
||||
# Adding model 'Repository'
|
||||
db.create_table(u'repository', (
|
||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('repository_group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['model.RepositoryGroup'])),
|
||||
('name', self.gf('django.db.models.fields.CharField')(max_length=50L)),
|
||||
('dvcs_type', self.gf('django.db.models.fields.CharField')(max_length=25L)),
|
||||
('url', self.gf('django.db.models.fields.CharField')(max_length=255L)),
|
||||
('codebase', self.gf('django.db.models.fields.CharField')(max_length=50L, blank=True)),
|
||||
('description', self.gf('django.db.models.fields.TextField')(default=u'fill me', blank=True)),
|
||||
('active_status', self.gf('django.db.models.fields.CharField')(default=u'active', max_length=7L, blank=True)),
|
||||
))
|
||||
db.send_create_signal(u'model', ['Repository'])
|
||||
|
||||
# Adding model 'MachinePlatform'
|
||||
db.create_table(u'machine_platform', (
|
||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('os_name', self.gf('django.db.models.fields.CharField')(max_length=25L)),
|
||||
('platform', self.gf('django.db.models.fields.CharField')(max_length=25L)),
|
||||
('architecture', self.gf('django.db.models.fields.CharField')(max_length=25L, blank=True)),
|
||||
('active_status', self.gf('django.db.models.fields.CharField')(default=u'active', max_length=7L, blank=True)),
|
||||
))
|
||||
db.send_create_signal(u'model', ['MachinePlatform'])
|
||||
|
||||
# Adding model 'Bugscache'
|
||||
db.create_table(u'bugscache', (
|
||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('status', self.gf('django.db.models.fields.CharField')(max_length=64L, blank=True)),
|
||||
('resolution', self.gf('django.db.models.fields.CharField')(max_length=64L, blank=True)),
|
||||
('summary', self.gf('django.db.models.fields.CharField')(max_length=255L)),
|
||||
('crash_signature', self.gf('django.db.models.fields.TextField')(blank=True)),
|
||||
('keywords', self.gf('django.db.models.fields.TextField')(blank=True)),
|
||||
('os', self.gf('django.db.models.fields.CharField')(max_length=64L, blank=True)),
|
||||
('modified', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
|
||||
))
|
||||
db.send_create_signal(u'model', ['Bugscache'])
|
||||
|
||||
# Adding model 'Machine'
|
||||
db.create_table(u'machine', (
|
||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('name', self.gf('django.db.models.fields.CharField')(max_length=50L)),
|
||||
('first_timestamp', self.gf('django.db.models.fields.IntegerField')()),
|
||||
('last_timestamp', self.gf('django.db.models.fields.IntegerField')()),
|
||||
('active_status', self.gf('django.db.models.fields.CharField')(default=u'active', max_length=7L, blank=True)),
|
||||
))
|
||||
db.send_create_signal(u'model', ['Machine'])
|
||||
|
||||
# Adding model 'MachineNote'
|
||||
db.create_table(u'machine_note', (
|
||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('machine', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['model.Machine'])),
|
||||
('author', self.gf('django.db.models.fields.CharField')(max_length=50L)),
|
||||
('machine_timestamp', self.gf('django.db.models.fields.IntegerField')()),
|
||||
('active_status', self.gf('django.db.models.fields.CharField')(default=u'active', max_length=7L, blank=True)),
|
||||
('note', self.gf('django.db.models.fields.TextField')(blank=True)),
|
||||
))
|
||||
db.send_create_signal(u'model', ['MachineNote'])
|
||||
|
||||
# Adding model 'Datasource'
|
||||
db.create_table(u'datasource', (
|
||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('project', self.gf('django.db.models.fields.CharField')(max_length=50L)),
|
||||
('contenttype', self.gf('django.db.models.fields.CharField')(max_length=25L)),
|
||||
('dataset', self.gf('django.db.models.fields.IntegerField')()),
|
||||
('host', self.gf('django.db.models.fields.CharField')(max_length=128L)),
|
||||
('read_only_host', self.gf('django.db.models.fields.CharField')(max_length=128L, blank=True)),
|
||||
('name', self.gf('django.db.models.fields.CharField')(max_length=128L)),
|
||||
('type', self.gf('django.db.models.fields.CharField')(max_length=25L)),
|
||||
('oauth_consumer_key', self.gf('django.db.models.fields.CharField')(max_length=45L, null=True, blank=True)),
|
||||
('oauth_consumer_secret', self.gf('django.db.models.fields.CharField')(max_length=45L, null=True, blank=True)),
|
||||
('creation_date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
|
||||
))
|
||||
db.send_create_signal(u'model', ['Datasource'])
|
||||
|
||||
# Adding unique constraint on 'Datasource', fields ['project', 'dataset', 'contenttype']
|
||||
db.create_unique(u'datasource', ['project', 'dataset', 'contenttype'])
|
||||
|
||||
# Adding unique constraint on 'Datasource', fields ['host', 'name']
|
||||
db.create_unique(u'datasource', ['host', 'name'])
|
||||
|
||||
# Adding model 'JobGroup'
|
||||
db.create_table(u'job_group', (
|
||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('symbol', self.gf('django.db.models.fields.CharField')(default=u'?', max_length=10L)),
|
||||
('name', self.gf('django.db.models.fields.CharField')(max_length=50L)),
|
||||
('description', self.gf('django.db.models.fields.TextField')(default=u'fill me', blank=True)),
|
||||
('active_status', self.gf('django.db.models.fields.CharField')(default=u'active', max_length=7L, blank=True)),
|
||||
))
|
||||
db.send_create_signal(u'model', ['JobGroup'])
|
||||
|
||||
# Adding model 'RepositoryVersion'
|
||||
db.create_table(u'repository_version', (
|
||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('repository', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['model.Repository'])),
|
||||
('version', self.gf('django.db.models.fields.CharField')(max_length=50L)),
|
||||
('version_timestamp', self.gf('django.db.models.fields.IntegerField')()),
|
||||
('active_status', self.gf('django.db.models.fields.CharField')(default=u'active', max_length=7L, blank=True)),
|
||||
))
|
||||
db.send_create_signal(u'model', ['RepositoryVersion'])
|
||||
|
||||
# Adding model 'OptionCollection'
|
||||
db.create_table(u'option_collection', (
|
||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('option_collection_hash', self.gf('django.db.models.fields.CharField')(max_length=40L)),
|
||||
('option', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['model.Option'])),
|
||||
))
|
||||
db.send_create_signal(u'model', ['OptionCollection'])
|
||||
|
||||
# Adding unique constraint on 'OptionCollection', fields ['option_collection_hash', 'option']
|
||||
db.create_unique(u'option_collection', ['option_collection_hash', 'option_id'])
|
||||
|
||||
# Adding model 'JobType'
|
||||
db.create_table(u'job_type', (
|
||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('job_group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['model.JobGroup'], null=True, blank=True)),
|
||||
('symbol', self.gf('django.db.models.fields.CharField')(default=u'?', max_length=10L)),
|
||||
('name', self.gf('django.db.models.fields.CharField')(max_length=50L)),
|
||||
('description', self.gf('django.db.models.fields.TextField')(default=u'fill me', blank=True)),
|
||||
('active_status', self.gf('django.db.models.fields.CharField')(default=u'active', max_length=7L, blank=True)),
|
||||
))
|
||||
db.send_create_signal(u'model', ['JobType'])
|
||||
|
||||
# Adding model 'FailureClassification'
|
||||
db.create_table(u'failure_classification', (
|
||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('name', self.gf('django.db.models.fields.CharField')(max_length=50L)),
|
||||
('description', self.gf('django.db.models.fields.TextField')(default=u'fill me', blank=True)),
|
||||
('active_status', self.gf('django.db.models.fields.CharField')(default=u'active', max_length=7L, blank=True)),
|
||||
))
|
||||
db.send_create_signal(u'model', ['FailureClassification'])
|
||||
|
||||
|
||||
def backwards(self, orm):
|
||||
# Removing unique constraint on 'OptionCollection', fields ['option_collection_hash', 'option']
|
||||
db.delete_unique(u'option_collection', ['option_collection_hash', 'option_id'])
|
||||
|
||||
# Removing unique constraint on 'Datasource', fields ['host', 'name']
|
||||
db.delete_unique(u'datasource', ['host', 'name'])
|
||||
|
||||
# Removing unique constraint on 'Datasource', fields ['project', 'dataset', 'contenttype']
|
||||
db.delete_unique(u'datasource', ['project', 'dataset', 'contenttype'])
|
||||
|
||||
# Deleting model 'Product'
|
||||
db.delete_table(u'product')
|
||||
|
||||
# Deleting model 'BuildPlatform'
|
||||
db.delete_table(u'build_platform')
|
||||
|
||||
# Deleting model 'Option'
|
||||
db.delete_table(u'option')
|
||||
|
||||
# Deleting model 'RepositoryGroup'
|
||||
db.delete_table(u'repository_group')
|
||||
|
||||
# Deleting model 'Repository'
|
||||
db.delete_table(u'repository')
|
||||
|
||||
# Deleting model 'MachinePlatform'
|
||||
db.delete_table(u'machine_platform')
|
||||
|
||||
# Deleting model 'Bugscache'
|
||||
db.delete_table(u'bugscache')
|
||||
|
||||
# Deleting model 'Machine'
|
||||
db.delete_table(u'machine')
|
||||
|
||||
# Deleting model 'MachineNote'
|
||||
db.delete_table(u'machine_note')
|
||||
|
||||
# Deleting model 'Datasource'
|
||||
db.delete_table(u'datasource')
|
||||
|
||||
# Deleting model 'JobGroup'
|
||||
db.delete_table(u'job_group')
|
||||
|
||||
# Deleting model 'RepositoryVersion'
|
||||
db.delete_table(u'repository_version')
|
||||
|
||||
# Deleting model 'OptionCollection'
|
||||
db.delete_table(u'option_collection')
|
||||
|
||||
# Deleting model 'JobType'
|
||||
db.delete_table(u'job_type')
|
||||
|
||||
# Deleting model 'FailureClassification'
|
||||
db.delete_table(u'failure_classification')
|
||||
|
||||
|
||||
models = {
|
||||
u'model.bugscache': {
|
||||
'Meta': {'object_name': 'Bugscache', 'db_table': "u'bugscache'"},
|
||||
'crash_signature': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'keywords': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'modified': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
|
||||
'os': ('django.db.models.fields.CharField', [], {'max_length': '64L', 'blank': 'True'}),
|
||||
'resolution': ('django.db.models.fields.CharField', [], {'max_length': '64L', 'blank': 'True'}),
|
||||
'status': ('django.db.models.fields.CharField', [], {'max_length': '64L', 'blank': 'True'}),
|
||||
'summary': ('django.db.models.fields.CharField', [], {'max_length': '255L'})
|
||||
},
|
||||
u'model.buildplatform': {
|
||||
'Meta': {'object_name': 'BuildPlatform', 'db_table': "u'build_platform'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'architecture': ('django.db.models.fields.CharField', [], {'max_length': '25L', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'os_name': ('django.db.models.fields.CharField', [], {'max_length': '25L'}),
|
||||
'platform': ('django.db.models.fields.CharField', [], {'max_length': '25L'})
|
||||
},
|
||||
u'model.datasource': {
|
||||
'Meta': {'unique_together': "[[u'project', u'dataset', u'contenttype'], [u'host', u'name']]", 'object_name': 'Datasource', 'db_table': "u'datasource'"},
|
||||
'contenttype': ('django.db.models.fields.CharField', [], {'max_length': '25L'}),
|
||||
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
|
||||
'dataset': ('django.db.models.fields.IntegerField', [], {}),
|
||||
'host': ('django.db.models.fields.CharField', [], {'max_length': '128L'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '128L'}),
|
||||
'oauth_consumer_key': ('django.db.models.fields.CharField', [], {'max_length': '45L', 'null': 'True', 'blank': 'True'}),
|
||||
'oauth_consumer_secret': ('django.db.models.fields.CharField', [], {'max_length': '45L', 'null': 'True', 'blank': 'True'}),
|
||||
'project': ('django.db.models.fields.CharField', [], {'max_length': '25L'}),
|
||||
'read_only_host': ('django.db.models.fields.CharField', [], {'max_length': '128L', 'blank': 'True'}),
|
||||
'type': ('django.db.models.fields.CharField', [], {'max_length': '25L'})
|
||||
},
|
||||
u'model.failureclassification': {
|
||||
'Meta': {'object_name': 'FailureClassification', 'db_table': "u'failure_classification'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'description': ('django.db.models.fields.TextField', [], {'default': "u'fill me'", 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50L'})
|
||||
},
|
||||
u'model.jobgroup': {
|
||||
'Meta': {'object_name': 'JobGroup', 'db_table': "u'job_group'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'description': ('django.db.models.fields.TextField', [], {'default': "u'fill me'", 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50L'}),
|
||||
'symbol': ('django.db.models.fields.CharField', [], {'default': "u'?'", 'max_length': '10L'})
|
||||
},
|
||||
u'model.jobtype': {
|
||||
'Meta': {'object_name': 'JobType', 'db_table': "u'job_type'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'description': ('django.db.models.fields.TextField', [], {'default': "u'fill me'", 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'job_group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['model.JobGroup']", 'null': 'True', 'blank': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50L'}),
|
||||
'symbol': ('django.db.models.fields.CharField', [], {'default': "u'?'", 'max_length': '10L'})
|
||||
},
|
||||
u'model.machine': {
|
||||
'Meta': {'object_name': 'Machine', 'db_table': "u'machine'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'first_timestamp': ('django.db.models.fields.IntegerField', [], {}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'last_timestamp': ('django.db.models.fields.IntegerField', [], {}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50L'})
|
||||
},
|
||||
u'model.machinenote': {
|
||||
'Meta': {'object_name': 'MachineNote', 'db_table': "u'machine_note'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'author': ('django.db.models.fields.CharField', [], {'max_length': '50L'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'machine': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['model.Machine']"}),
|
||||
'machine_timestamp': ('django.db.models.fields.IntegerField', [], {}),
|
||||
'note': ('django.db.models.fields.TextField', [], {'blank': 'True'})
|
||||
},
|
||||
u'model.machineplatform': {
|
||||
'Meta': {'object_name': 'MachinePlatform', 'db_table': "u'machine_platform'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'architecture': ('django.db.models.fields.CharField', [], {'max_length': '25L', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'os_name': ('django.db.models.fields.CharField', [], {'max_length': '25L'}),
|
||||
'platform': ('django.db.models.fields.CharField', [], {'max_length': '25L'})
|
||||
},
|
||||
u'model.option': {
|
||||
'Meta': {'object_name': 'Option', 'db_table': "u'option'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'description': ('django.db.models.fields.TextField', [], {'default': "u'fill me'", 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50L'})
|
||||
},
|
||||
u'model.optioncollection': {
|
||||
'Meta': {'unique_together': "([u'option_collection_hash', u'option'],)", 'object_name': 'OptionCollection', 'db_table': "u'option_collection'"},
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'option': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['model.Option']"}),
|
||||
'option_collection_hash': ('django.db.models.fields.CharField', [], {'max_length': '40L'})
|
||||
},
|
||||
u'model.product': {
|
||||
'Meta': {'object_name': 'Product', 'db_table': "u'product'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'description': ('django.db.models.fields.TextField', [], {'default': "u'fill me'", 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50L'})
|
||||
},
|
||||
u'model.repository': {
|
||||
'Meta': {'object_name': 'Repository', 'db_table': "u'repository'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'codebase': ('django.db.models.fields.CharField', [], {'max_length': '50L', 'blank': 'True'}),
|
||||
'description': ('django.db.models.fields.TextField', [], {'default': "u'fill me'", 'blank': 'True'}),
|
||||
'dvcs_type': ('django.db.models.fields.CharField', [], {'max_length': '25L'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50L'}),
|
||||
'repository_group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['model.RepositoryGroup']"}),
|
||||
'url': ('django.db.models.fields.CharField', [], {'max_length': '255L'})
|
||||
},
|
||||
u'model.repositorygroup': {
|
||||
'Meta': {'object_name': 'RepositoryGroup', 'db_table': "u'repository_group'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'description': ('django.db.models.fields.TextField', [], {'default': "u'fill me'", 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50L'})
|
||||
},
|
||||
u'model.repositoryversion': {
|
||||
'Meta': {'object_name': 'RepositoryVersion', 'db_table': "u'repository_version'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'repository': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['model.Repository']"}),
|
||||
'version': ('django.db.models.fields.CharField', [], {'max_length': '50L'}),
|
||||
'version_timestamp': ('django.db.models.fields.IntegerField', [], {})
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['model']
|
|
@ -1,254 +0,0 @@
|
|||
# -*- 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 'UserExclusionProfile'
|
||||
db.create_table(u'model_userexclusionprofile', (
|
||||
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'exclusion_profiles', to=orm['auth.User'])),
|
||||
('exclusion_profile', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['model.ExclusionProfile'], null=True, blank=True)),
|
||||
('is_default', self.gf('django.db.models.fields.BooleanField')(default=True)),
|
||||
))
|
||||
db.send_create_signal(u'model', ['UserExclusionProfile'])
|
||||
|
||||
# Adding model 'ExclusionProfile'
|
||||
db.create_table(u'model_exclusionprofile', (
|
||||
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
|
||||
('is_default', self.gf('django.db.models.fields.BooleanField')(default=False)),
|
||||
('flat_exclusion', self.gf('jsonfield.fields.JSONField')(default={}, blank=True)),
|
||||
('author', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'exclusion_profiles_authored', to=orm['auth.User'])),
|
||||
))
|
||||
db.send_create_signal(u'model', ['ExclusionProfile'])
|
||||
|
||||
# Adding M2M table for field exclusions on 'ExclusionProfile'
|
||||
db.create_table(u'model_exclusionprofile_exclusions', (
|
||||
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
|
||||
('exclusionprofile', models.ForeignKey(orm[u'model.exclusionprofile'], null=False)),
|
||||
('jobexclusion', models.ForeignKey(orm[u'model.jobexclusion'], null=False))
|
||||
))
|
||||
db.create_unique(u'model_exclusionprofile_exclusions', ['exclusionprofile_id', 'jobexclusion_id'])
|
||||
|
||||
# Adding model 'JobExclusion'
|
||||
db.create_table(u'model_jobexclusion', (
|
||||
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
|
||||
('description', self.gf('django.db.models.fields.TextField')(blank=True)),
|
||||
('info', self.gf('jsonfield.fields.JSONField')()),
|
||||
('author', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
|
||||
))
|
||||
db.send_create_signal(u'model', ['JobExclusion'])
|
||||
|
||||
|
||||
def backwards(self, orm):
|
||||
# Deleting model 'UserExclusionProfile'
|
||||
db.delete_table(u'model_userexclusionprofile')
|
||||
|
||||
# Deleting model 'ExclusionProfile'
|
||||
db.delete_table(u'model_exclusionprofile')
|
||||
|
||||
# Removing M2M table for field exclusion on 'ExclusionProfile'
|
||||
db.delete_table('model_exclusionprofile_exclusions')
|
||||
|
||||
# Deleting model 'JobExclusion'
|
||||
db.delete_table(u'model_jobexclusion')
|
||||
|
||||
|
||||
models = {
|
||||
u'auth.group': {
|
||||
'Meta': {'object_name': 'Group'},
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
|
||||
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
|
||||
},
|
||||
u'auth.permission': {
|
||||
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
|
||||
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
|
||||
},
|
||||
u'auth.user': {
|
||||
'Meta': {'object_name': 'User'},
|
||||
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
|
||||
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
|
||||
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
|
||||
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
|
||||
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
|
||||
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
|
||||
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
|
||||
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
|
||||
},
|
||||
u'contenttypes.contenttype': {
|
||||
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
|
||||
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
|
||||
},
|
||||
u'model.bugscache': {
|
||||
'Meta': {'object_name': 'Bugscache', 'db_table': "u'bugscache'"},
|
||||
'crash_signature': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'keywords': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'modified': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
|
||||
'os': ('django.db.models.fields.CharField', [], {'max_length': '64L', 'blank': 'True'}),
|
||||
'resolution': ('django.db.models.fields.CharField', [], {'max_length': '64L', 'blank': 'True'}),
|
||||
'status': ('django.db.models.fields.CharField', [], {'max_length': '64L', 'blank': 'True'}),
|
||||
'summary': ('django.db.models.fields.CharField', [], {'max_length': '255L'})
|
||||
},
|
||||
u'model.buildplatform': {
|
||||
'Meta': {'object_name': 'BuildPlatform', 'db_table': "u'build_platform'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'architecture': ('django.db.models.fields.CharField', [], {'max_length': '25L', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'os_name': ('django.db.models.fields.CharField', [], {'max_length': '25L'}),
|
||||
'platform': ('django.db.models.fields.CharField', [], {'max_length': '25L'})
|
||||
},
|
||||
u'model.datasource': {
|
||||
'Meta': {'unique_together': "[[u'project', u'dataset', u'contenttype'], [u'host', u'name']]", 'object_name': 'Datasource', 'db_table': "u'datasource'"},
|
||||
'contenttype': ('django.db.models.fields.CharField', [], {'max_length': '25L'}),
|
||||
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
|
||||
'dataset': ('django.db.models.fields.IntegerField', [], {}),
|
||||
'host': ('django.db.models.fields.CharField', [], {'max_length': '128L'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '128L'}),
|
||||
'oauth_consumer_key': ('django.db.models.fields.CharField', [], {'max_length': '45L', 'null': 'True', 'blank': 'True'}),
|
||||
'oauth_consumer_secret': ('django.db.models.fields.CharField', [], {'max_length': '45L', 'null': 'True', 'blank': 'True'}),
|
||||
'project': ('django.db.models.fields.CharField', [], {'max_length': '25L'}),
|
||||
'read_only_host': ('django.db.models.fields.CharField', [], {'max_length': '128L', 'blank': 'True'}),
|
||||
'type': ('django.db.models.fields.CharField', [], {'max_length': '25L'})
|
||||
},
|
||||
u'model.exclusionprofile': {
|
||||
'Meta': {'object_name': 'ExclusionProfile'},
|
||||
'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'exclusion_profiles_authored'", 'to': u"orm['auth.User']"}),
|
||||
'exclusions': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "u'profiles'", 'symmetrical': 'False', 'to': u"orm['model.JobExclusion']"}),
|
||||
'flat_exclusion': ('jsonfield.fields.JSONField', [], {'default': '{}', 'blank': 'True'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'is_default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
|
||||
},
|
||||
u'model.failureclassification': {
|
||||
'Meta': {'object_name': 'FailureClassification', 'db_table': "u'failure_classification'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'description': ('django.db.models.fields.TextField', [], {'default': "u'fill me'", 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50L'})
|
||||
},
|
||||
u'model.jobexclusion': {
|
||||
'Meta': {'object_name': 'JobExclusion'},
|
||||
'author': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}),
|
||||
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'info': ('jsonfield.fields.JSONField', [], {}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
|
||||
},
|
||||
u'model.jobgroup': {
|
||||
'Meta': {'object_name': 'JobGroup', 'db_table': "u'job_group'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'description': ('django.db.models.fields.TextField', [], {'default': "u'fill me'", 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50L'}),
|
||||
'symbol': ('django.db.models.fields.CharField', [], {'default': "u'?'", 'max_length': '10L'})
|
||||
},
|
||||
u'model.jobtype': {
|
||||
'Meta': {'object_name': 'JobType', 'db_table': "u'job_type'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'description': ('django.db.models.fields.TextField', [], {'default': "u'fill me'", 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'job_group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['model.JobGroup']", 'null': 'True', 'blank': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50L'}),
|
||||
'symbol': ('django.db.models.fields.CharField', [], {'default': "u'?'", 'max_length': '10L'})
|
||||
},
|
||||
u'model.machine': {
|
||||
'Meta': {'object_name': 'Machine', 'db_table': "u'machine'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'first_timestamp': ('django.db.models.fields.IntegerField', [], {}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'last_timestamp': ('django.db.models.fields.IntegerField', [], {}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50L'})
|
||||
},
|
||||
u'model.machinenote': {
|
||||
'Meta': {'object_name': 'MachineNote', 'db_table': "u'machine_note'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'author': ('django.db.models.fields.CharField', [], {'max_length': '50L'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'machine': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['model.Machine']"}),
|
||||
'machine_timestamp': ('django.db.models.fields.IntegerField', [], {}),
|
||||
'note': ('django.db.models.fields.TextField', [], {'blank': 'True'})
|
||||
},
|
||||
u'model.machineplatform': {
|
||||
'Meta': {'object_name': 'MachinePlatform', 'db_table': "u'machine_platform'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'architecture': ('django.db.models.fields.CharField', [], {'max_length': '25L', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'os_name': ('django.db.models.fields.CharField', [], {'max_length': '25L'}),
|
||||
'platform': ('django.db.models.fields.CharField', [], {'max_length': '25L'})
|
||||
},
|
||||
u'model.option': {
|
||||
'Meta': {'object_name': 'Option', 'db_table': "u'option'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'description': ('django.db.models.fields.TextField', [], {'default': "u'fill me'", 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50L'})
|
||||
},
|
||||
u'model.optioncollection': {
|
||||
'Meta': {'unique_together': "([u'option_collection_hash', u'option'],)", 'object_name': 'OptionCollection', 'db_table': "u'option_collection'"},
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'option': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['model.Option']"}),
|
||||
'option_collection_hash': ('django.db.models.fields.CharField', [], {'max_length': '40L'})
|
||||
},
|
||||
u'model.product': {
|
||||
'Meta': {'object_name': 'Product', 'db_table': "u'product'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'description': ('django.db.models.fields.TextField', [], {'default': "u'fill me'", 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50L'})
|
||||
},
|
||||
u'model.repository': {
|
||||
'Meta': {'object_name': 'Repository', 'db_table': "u'repository'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'codebase': ('django.db.models.fields.CharField', [], {'max_length': '50L', 'blank': 'True'}),
|
||||
'description': ('django.db.models.fields.TextField', [], {'default': "u'fill me'", 'blank': 'True'}),
|
||||
'dvcs_type': ('django.db.models.fields.CharField', [], {'max_length': '25L'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50L'}),
|
||||
'repository_group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['model.RepositoryGroup']"}),
|
||||
'url': ('django.db.models.fields.CharField', [], {'max_length': '255L'})
|
||||
},
|
||||
u'model.repositorygroup': {
|
||||
'Meta': {'object_name': 'RepositoryGroup', 'db_table': "u'repository_group'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'description': ('django.db.models.fields.TextField', [], {'default': "u'fill me'", 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50L'})
|
||||
},
|
||||
u'model.repositoryversion': {
|
||||
'Meta': {'object_name': 'RepositoryVersion', 'db_table': "u'repository_version'"},
|
||||
'active_status': ('django.db.models.fields.CharField', [], {'default': "u'active'", 'max_length': '7L', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'repository': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['model.Repository']"}),
|
||||
'version': ('django.db.models.fields.CharField', [], {'max_length': '50L'}),
|
||||
'version_timestamp': ('django.db.models.fields.IntegerField', [], {})
|
||||
},
|
||||
u'model.userexclusionprofile': {
|
||||
'Meta': {'object_name': 'UserExclusionProfile'},
|
||||
'exclusion_profile': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['model.ExclusionProfile']", 'null': 'True', 'blank': 'True'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'is_default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'exclusion_profiles'", 'to': u"orm['auth.User']"})
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['model']
|
|
@ -552,6 +552,9 @@ class JobExclusion(models.Model):
|
|||
for profile in self.profiles.all():
|
||||
profile.save()
|
||||
|
||||
class Meta:
|
||||
db_table = 'job_exclusion'
|
||||
|
||||
|
||||
class ExclusionProfile(models.Model):
|
||||
"""
|
||||
|
@ -559,7 +562,7 @@ class ExclusionProfile(models.Model):
|
|||
"""
|
||||
name = models.CharField(max_length=255, unique=True)
|
||||
is_default = models.BooleanField(default=False)
|
||||
exclusions = models.ManyToManyField(JobExclusion, related_name="profiles")
|
||||
exclusions = models.ManyToManyField(JobExclusion, related_name="profiles", through="ExclusionProfileExclusions")
|
||||
flat_exclusion = JSONField(blank=True, default={})
|
||||
author = models.ForeignKey(User, related_name="exclusion_profiles_authored")
|
||||
|
||||
|
@ -591,6 +594,9 @@ class ExclusionProfile(models.Model):
|
|||
if self.is_default:
|
||||
ExclusionProfile.objects.filter(is_default=True).exclude(id=self.id).update(is_default=False)
|
||||
|
||||
class Meta:
|
||||
db_table = 'exclusion_profile'
|
||||
|
||||
|
||||
class UserExclusionProfile(models.Model):
|
||||
"""
|
||||
|
@ -601,3 +607,47 @@ class UserExclusionProfile(models.Model):
|
|||
user = models.ForeignKey(User, related_name="exclusion_profiles")
|
||||
exclusion_profile = models.ForeignKey(ExclusionProfile, blank=True, null=True)
|
||||
is_default = models.BooleanField(default=True)
|
||||
|
||||
class Meta:
|
||||
db_table = 'user_exclusion_profile'
|
||||
|
||||
|
||||
class ExclusionProfileExclusions(models.Model):
|
||||
"""
|
||||
A many to many entity for exclusion profiles and job exclusions
|
||||
"""
|
||||
|
||||
exclusionprofile = models.ForeignKey(ExclusionProfile)
|
||||
jobexclusion = models.ForeignKey(JobExclusion)
|
||||
|
||||
class Meta:
|
||||
db_table = 'exclusionprofile_exclusions'
|
||||
|
||||
|
||||
class ReferenceDataSignatures(models.Model):
|
||||
"""
|
||||
A collection of all the possible combinations of reference data,
|
||||
populated on data ingestion. signature is a hash of the data it refers to
|
||||
build_system_type is buildbot by default
|
||||
"""
|
||||
name = models.CharField(max_length=150L)
|
||||
signature = models.CharField(max_length=50L)
|
||||
build_os_name = models.CharField(max_length=25L)
|
||||
build_platform = models.CharField(max_length=25L)
|
||||
build_architecture = models.CharField(max_length=25L)
|
||||
machine_os_name = models.CharField(max_length=25L)
|
||||
machine_platform = models.CharField(max_length=25L)
|
||||
machine_architecture = models.CharField(max_length=25L)
|
||||
device_name = models.CharField(max_length=50L)
|
||||
job_group_name = models.CharField(max_length=100L, blank=True)
|
||||
job_group_symbol = models.CharField(max_length=25L, blank=True)
|
||||
job_type_name = models.CharField(max_length=100L)
|
||||
job_type_symbol = models.CharField(max_length=25L, blank=True)
|
||||
option_collection_hash = models.CharField(max_length=64L, blank=True)
|
||||
build_system_type = models.CharField(max_length=25L, blank=True)
|
||||
first_submission_timestamp = models.IntegerField()
|
||||
review_timestamp = models.IntegerField(null=True, blank=True)
|
||||
review_status = models.CharField(max_length=12L, blank=True)
|
||||
|
||||
class Meta:
|
||||
db_table = 'reference_data_signatures'
|
||||
|
|
|
@ -654,8 +654,126 @@ CREATE TABLE `repository_version` (
|
|||
CONSTRAINT `fk_repository` FOREIGN KEY (`repository_id`) REFERENCES `repository` (`id`)
|
||||
) ENGINE={engine} DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
DROP TABLE IF EXISTS `job_exclusion`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
|
||||
/**************************
|
||||
* Table: job_exclusion
|
||||
*
|
||||
* A list of job exclusions expressed in terms of reference data
|
||||
*
|
||||
* Population Method: manual via ui
|
||||
*
|
||||
* Example Data:
|
||||
*
|
||||
* name - my_job_exclusion
|
||||
* description - This is a very descriptive text
|
||||
* info - a json field containing the reference data combination
|
||||
* author_id - references auth_user.id
|
||||
**************************/
|
||||
CREATE TABLE `job_exclusion` (
|
||||
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||
`name` varchar(255) NOT NULL UNIQUE,
|
||||
`description` longtext NOT NULL,
|
||||
`info` longtext NOT NULL,
|
||||
`author_id` integer NOT NULL,
|
||||
|
||||
KEY `idx_name` (`name`)
|
||||
) ENGINE={engine} DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `exclusion_profile`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
/**************************
|
||||
* Table: exclusion_profile
|
||||
*
|
||||
* A list of profile for job exclusions.
|
||||
* This allows to hide different sets of jobs based on the user
|
||||
*
|
||||
* Population Method: manual via ui
|
||||
*
|
||||
* Example Data:
|
||||
*
|
||||
* name - My profile name
|
||||
* is_default - 0|1
|
||||
* flat_exclusion - a json field containing a flattened version of the job exclusions
|
||||
**************************/
|
||||
CREATE TABLE `exclusion_profile` (
|
||||
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||
`name` varchar(255) NOT NULL UNIQUE,
|
||||
`is_default` bool NOT NULL,
|
||||
`flat_exclusion` longtext NOT NULL,
|
||||
`author_id` integer NOT NULL,
|
||||
KEY `idx_name` (`name`),
|
||||
KEY `idx_is_default` (`is_default`),
|
||||
KEY `idx_author` (`author_id`)
|
||||
)ENGINE={engine} DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `user_exclusion_profile`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
/**************************
|
||||
* Table: user_exclusion_profile
|
||||
*
|
||||
* A many to many relationship between auth_user and exclusion_profile
|
||||
* A user can have more than one profile and profiles are shared among users
|
||||
* is_default indicates if this is the default profile for the user
|
||||
*
|
||||
* Population Method: manual via ui
|
||||
*
|
||||
* Example Data:
|
||||
*
|
||||
* user_id - references auth_user.id
|
||||
* exclusion_profile_id - references exclusion_profile.id
|
||||
* is_default - 0|1
|
||||
**************************/
|
||||
CREATE TABLE `user_exclusion_profile` (
|
||||
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||
`user_id` integer NOT NULL,
|
||||
`exclusion_profile_id` integer,
|
||||
`is_default` bool NOT NULL,
|
||||
UNIQUE (`user_id`, `exclusion_profile_id`),
|
||||
KEY `idx_is_default` (`is_default`),
|
||||
KEY `idx_user` (`user_id`),
|
||||
CONSTRAINT `fk_exclusion_profile` FOREIGN KEY (`exclusion_profile_id`) REFERENCES `exclusion_profile` (`id`)
|
||||
)ENGINE={engine} DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `exclusion_profile_exclusions`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
/**************************
|
||||
* Table: exclusionprofile_exclusions
|
||||
*
|
||||
* Many to many relationship between exclusionprofile
|
||||
*
|
||||
* Population Method: manual via ui
|
||||
*
|
||||
* Example Data:
|
||||
*
|
||||
* exclusionprofile_id - references exclusion_profile.id
|
||||
* jobexclusion_id - references job_exclusion.id
|
||||
**************************/
|
||||
CREATE TABLE `exclusion_profile_exclusions` (
|
||||
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||
`exclusionprofile_id` integer NOT NULL,
|
||||
`jobexclusion_id` integer NOT NULL,
|
||||
UNIQUE (`exclusionprofile_id`, `jobexclusion_id`),
|
||||
CONSTRAINT `fk_exclusionprofile` FOREIGN KEY (`exclusionprofile_id`) REFERENCES `exclusion_profile` (`id`),
|
||||
CONSTRAINT `fk_jobexclusion` FOREIGN KEY (`jobexclusion_id`) REFERENCES `job_exclusion` (`id`)
|
||||
) ENGINE={engine} DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
||||
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
|
@ -664,4 +782,6 @@ CREATE TABLE `repository_version` (
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
|
||||
|
||||
-- Dump completed on 2013-02-27 8:55:49
|
||||
|
|
Загрузка…
Ссылка в новой задаче