This repository has been archived by the owner on Nov 30, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove build version so push-hook doesn't have to increment it re #35
- Loading branch information
Gabriel Monroy
committed
Jul 26, 2013
1 parent
519969b
commit ce3430a
Showing
4 changed files
with
208 additions
and
13 deletions.
There are no files selected for viewing
206 changes: 206 additions & 0 deletions
206
api/migrations/0002_auto__del_field_build_version__del_unique_build_version_formation.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,206 @@ | ||
# -*- 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): | ||
# Removing unique constraint on 'Build', fields ['version', 'formation'] | ||
db.delete_unique(u'api_build', ['version', 'formation_id']) | ||
|
||
# Deleting field 'Build.version' | ||
db.delete_column(u'api_build', 'version') | ||
|
||
|
||
def backwards(self, orm): | ||
|
||
# User chose to not deal with backwards NULL issues for 'Build.version' | ||
raise RuntimeError("Cannot reverse this migration. 'Build.version' and its values cannot be restored.") | ||
# Adding unique constraint on 'Build', fields ['version', 'formation'] | ||
db.create_unique(u'api_build', ['version', 'formation_id']) | ||
|
||
|
||
models = { | ||
u'api.access': { | ||
'Meta': {'object_name': 'Access'}, | ||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
'formation': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Formation']"}), | ||
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), | ||
'role': ('django.db.models.fields.CharField', [], {'default': "u'user'", 'max_length': '6'}), | ||
'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), | ||
'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) | ||
}, | ||
u'api.build': { | ||
'Meta': {'ordering': "[u'-created']", 'object_name': 'Build'}, | ||
'checksum': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), | ||
'config': ('api.fields.EnvVarsField', [], {'default': "u'null'", 'blank': 'True'}), | ||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
'dockerfile': ('django.db.models.fields.TextField', [], {'blank': 'True'}), | ||
'formation': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Formation']"}), | ||
'output': ('django.db.models.fields.TextField', [], {'blank': 'True'}), | ||
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), | ||
'procfile': ('api.fields.ProcfileField', [], {'default': "u'null'", 'blank': 'True'}), | ||
'sha': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), | ||
'size': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), | ||
'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), | ||
'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}), | ||
'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) | ||
}, | ||
u'api.config': { | ||
'Meta': {'ordering': "[u'-created']", 'unique_together': "((u'formation', u'version'),)", 'object_name': 'Config'}, | ||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
'formation': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Formation']"}), | ||
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), | ||
'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), | ||
'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}), | ||
'values': ('api.fields.EnvVarsField', [], {'default': "u'{}'", 'blank': 'True'}), | ||
'version': ('django.db.models.fields.PositiveIntegerField', [], {}) | ||
}, | ||
u'api.container': { | ||
'Meta': {'unique_together': "((u'formation', u'type', u'num'),)", 'object_name': 'Container'}, | ||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
'formation': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Formation']"}), | ||
'id': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), | ||
'metadata': ('json_field.fields.JSONField', [], {'default': "u'null'", 'blank': 'True'}), | ||
'node': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Node']"}), | ||
'num': ('django.db.models.fields.PositiveIntegerField', [], {}), | ||
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), | ||
'port': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), | ||
'type': ('django.db.models.fields.CharField', [], {'max_length': '128'}), | ||
'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), | ||
'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) | ||
}, | ||
u'api.event': { | ||
'Meta': {'object_name': 'Event'}, | ||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
'formation': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Formation']"}), | ||
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), | ||
'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), | ||
'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) | ||
}, | ||
u'api.flavor': { | ||
'Meta': {'unique_together': "((u'owner', u'id'),)", 'object_name': 'Flavor'}, | ||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
'id': ('django.db.models.fields.SlugField', [], {'max_length': '64'}), | ||
'init': ('api.fields.CloudInitField', [], {}), | ||
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), | ||
'params': ('api.fields.ParamsField', [], {'default': "u'null'"}), | ||
'provider': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Provider']"}), | ||
'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), | ||
'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) | ||
}, | ||
u'api.formation': { | ||
'Meta': {'unique_together': "((u'owner', u'id'),)", 'object_name': 'Formation'}, | ||
'containers': ('json_field.fields.JSONField', [], {'default': "u'{}'", 'blank': 'True'}), | ||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
'id': ('django.db.models.fields.SlugField', [], {'max_length': '64'}), | ||
'layers': ('json_field.fields.JSONField', [], {'default': "u'{}'", 'blank': 'True'}), | ||
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), | ||
'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), | ||
'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) | ||
}, | ||
u'api.key': { | ||
'Meta': {'unique_together': "((u'owner', u'id'),)", 'object_name': 'Key'}, | ||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
'id': ('django.db.models.fields.CharField', [], {'max_length': '128'}), | ||
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), | ||
'public': ('django.db.models.fields.TextField', [], {}), | ||
'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), | ||
'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) | ||
}, | ||
u'api.layer': { | ||
'Meta': {'unique_together': "((u'formation', u'id'),)", 'object_name': 'Layer'}, | ||
'chef_version': ('django.db.models.fields.CharField', [], {'default': "u'11.4.4'", 'max_length': '32'}), | ||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
'environment': ('django.db.models.fields.CharField', [], {'default': "u'_default'", 'max_length': '64'}), | ||
'flavor': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Flavor']"}), | ||
'formation': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Formation']"}), | ||
'id': ('django.db.models.fields.SlugField', [], {'max_length': '64'}), | ||
'initial_attributes': ('json_field.fields.JSONField', [], {'default': "u'{}'", 'blank': 'True'}), | ||
'level': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), | ||
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), | ||
'run_list': ('django.db.models.fields.CharField', [], {'max_length': '512'}), | ||
'ssh_private_key': ('django.db.models.fields.TextField', [], {}), | ||
'ssh_public_key': ('django.db.models.fields.TextField', [], {}), | ||
'ssh_username': ('django.db.models.fields.CharField', [], {'default': "u'ubuntu'", 'max_length': '64'}), | ||
'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), | ||
'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) | ||
}, | ||
u'api.node': { | ||
'Meta': {'unique_together': "((u'formation', u'id'),)", 'object_name': 'Node'}, | ||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
'formation': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Formation']"}), | ||
'fqdn': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}), | ||
'id': ('django.db.models.fields.CharField', [], {'max_length': '64'}), | ||
'layer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Layer']"}), | ||
'num': ('django.db.models.fields.PositiveIntegerField', [], {}), | ||
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), | ||
'provider_id': ('django.db.models.fields.SlugField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}), | ||
'status': ('api.fields.NodeStatusField', [], {'default': "u'null'", 'null': 'True', 'blank': 'True'}), | ||
'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), | ||
'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) | ||
}, | ||
u'api.provider': { | ||
'Meta': {'unique_together': "((u'owner', u'id'),)", 'object_name': 'Provider'}, | ||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
'creds': ('api.fields.CredentialsField', [], {'default': "u'null'"}), | ||
'id': ('django.db.models.fields.SlugField', [], {'max_length': '64'}), | ||
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), | ||
'type': ('django.db.models.fields.SlugField', [], {'max_length': '16'}), | ||
'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), | ||
'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) | ||
}, | ||
u'api.release': { | ||
'Meta': {'ordering': "[u'-created']", 'unique_together': "((u'formation', u'version'),)", 'object_name': 'Release'}, | ||
'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Build']", 'null': 'True', 'blank': 'True'}), | ||
'config': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Config']"}), | ||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
'formation': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Formation']"}), | ||
'image': ('django.db.models.fields.CharField', [], {'default': "u'ubuntu'", 'max_length': '256'}), | ||
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), | ||
'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), | ||
'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}), | ||
'version': ('django.db.models.fields.PositiveIntegerField', [], {}) | ||
}, | ||
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'}) | ||
} | ||
} | ||
|
||
complete_apps = ['api'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters