1+ # -*- coding: utf-8 -*-
2+ import datetime
3+ from south .db import db
4+ from south .v2 import SchemaMigration
5+ from django .db import models
6+
7+
8+ class Migration (SchemaMigration ):
9+
10+ def forwards (self , orm ):
11+ # Deleting field 'Container.port'
12+ db .delete_column (u'api_container' , 'port' )
13+
14+ # Deleting field 'Container.id'
15+ db .delete_column (u'api_container' , 'id' )
16+
17+ # Deleting field 'Container.metadata'
18+ db .delete_column (u'api_container' , 'metadata' )
19+
20+ # Adding field 'Container.status'
21+ db .add_column (u'api_container' , 'status' ,
22+ self .gf ('django.db.models.fields.CharField' )(default = u'up' , max_length = 64 ),
23+ keep_default = False )
24+
25+
26+ def backwards (self , orm ):
27+ # Adding field 'Container.port'
28+ db .add_column (u'api_container' , 'port' ,
29+ self .gf ('django.db.models.fields.IntegerField' )(null = True , blank = True ),
30+ keep_default = False )
31+
32+ # Adding field 'Container.id'
33+ db .add_column (u'api_container' , 'id' ,
34+ self .gf ('django.db.models.fields.CharField' )(default = '' , max_length = 128 , blank = True ),
35+ keep_default = False )
36+
37+ # Adding field 'Container.metadata'
38+ db .add_column (u'api_container' , 'metadata' ,
39+ self .gf ('json_field.fields.JSONField' )(default = u'null' , blank = True ),
40+ keep_default = False )
41+
42+ # Deleting field 'Container.status'
43+ db .delete_column (u'api_container' , 'status' )
44+
45+
46+ models = {
47+ u'api.build' : {
48+ 'Meta' : {'ordering' : "[u'-created']" , 'object_name' : 'Build' },
49+ 'checksum' : ('django.db.models.fields.CharField' , [], {'max_length' : '255' , 'blank' : 'True' }),
50+ 'config' : ('api.fields.EnvVarsField' , [], {'default' : "u'null'" , 'blank' : 'True' }),
51+ 'created' : ('django.db.models.fields.DateTimeField' , [], {'auto_now_add' : 'True' , 'blank' : 'True' }),
52+ 'dockerfile' : ('django.db.models.fields.TextField' , [], {'blank' : 'True' }),
53+ 'formation' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['api.Formation']" }),
54+ 'output' : ('django.db.models.fields.TextField' , [], {'blank' : 'True' }),
55+ 'owner' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['auth.User']" }),
56+ 'procfile' : ('api.fields.ProcfileField' , [], {'default' : "u'null'" , 'blank' : 'True' }),
57+ 'sha' : ('django.db.models.fields.CharField' , [], {'max_length' : '255' , 'blank' : 'True' }),
58+ 'size' : ('django.db.models.fields.IntegerField' , [], {'null' : 'True' , 'blank' : 'True' }),
59+ 'updated' : ('django.db.models.fields.DateTimeField' , [], {'auto_now' : 'True' , 'blank' : 'True' }),
60+ 'url' : ('django.db.models.fields.URLField' , [], {'max_length' : '200' }),
61+ 'uuid' : ('api.fields.UuidField' , [], {'unique' : 'True' , 'max_length' : '32' , 'primary_key' : 'True' })
62+ },
63+ u'api.config' : {
64+ 'Meta' : {'ordering' : "[u'-created']" , 'unique_together' : "((u'formation', u'version'),)" , 'object_name' : 'Config' },
65+ 'created' : ('django.db.models.fields.DateTimeField' , [], {'auto_now_add' : 'True' , 'blank' : 'True' }),
66+ 'formation' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['api.Formation']" }),
67+ 'owner' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['auth.User']" }),
68+ 'updated' : ('django.db.models.fields.DateTimeField' , [], {'auto_now' : 'True' , 'blank' : 'True' }),
69+ 'uuid' : ('api.fields.UuidField' , [], {'unique' : 'True' , 'max_length' : '32' , 'primary_key' : 'True' }),
70+ 'values' : ('api.fields.EnvVarsField' , [], {'default' : "u'{}'" , 'blank' : 'True' }),
71+ 'version' : ('django.db.models.fields.PositiveIntegerField' , [], {})
72+ },
73+ u'api.container' : {
74+ 'Meta' : {'ordering' : "[u'created']" , 'unique_together' : "((u'formation', u'type', u'num'),)" , 'object_name' : 'Container' },
75+ 'created' : ('django.db.models.fields.DateTimeField' , [], {'auto_now_add' : 'True' , 'blank' : 'True' }),
76+ 'formation' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['api.Formation']" }),
77+ 'node' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['api.Node']" }),
78+ 'num' : ('django.db.models.fields.PositiveIntegerField' , [], {}),
79+ 'owner' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['auth.User']" }),
80+ 'status' : ('django.db.models.fields.CharField' , [], {'default' : "u'up'" , 'max_length' : '64' }),
81+ 'type' : ('django.db.models.fields.CharField' , [], {'max_length' : '128' }),
82+ 'updated' : ('django.db.models.fields.DateTimeField' , [], {'auto_now' : 'True' , 'blank' : 'True' }),
83+ 'uuid' : ('api.fields.UuidField' , [], {'unique' : 'True' , 'max_length' : '32' , 'primary_key' : 'True' })
84+ },
85+ u'api.flavor' : {
86+ 'Meta' : {'unique_together' : "((u'owner', u'id'),)" , 'object_name' : 'Flavor' },
87+ 'created' : ('django.db.models.fields.DateTimeField' , [], {'auto_now_add' : 'True' , 'blank' : 'True' }),
88+ 'id' : ('django.db.models.fields.SlugField' , [], {'max_length' : '64' }),
89+ 'init' : ('api.fields.CloudInitField' , [], {}),
90+ 'owner' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['auth.User']" }),
91+ 'params' : ('api.fields.ParamsField' , [], {'default' : "u'null'" }),
92+ 'provider' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['api.Provider']" }),
93+ 'updated' : ('django.db.models.fields.DateTimeField' , [], {'auto_now' : 'True' , 'blank' : 'True' }),
94+ 'uuid' : ('api.fields.UuidField' , [], {'unique' : 'True' , 'max_length' : '32' , 'primary_key' : 'True' })
95+ },
96+ u'api.formation' : {
97+ 'Meta' : {'unique_together' : "((u'owner', u'id'),)" , 'object_name' : 'Formation' },
98+ 'containers' : ('json_field.fields.JSONField' , [], {'default' : "u'{}'" , 'blank' : 'True' }),
99+ 'created' : ('django.db.models.fields.DateTimeField' , [], {'auto_now_add' : 'True' , 'blank' : 'True' }),
100+ 'id' : ('django.db.models.fields.SlugField' , [], {'max_length' : '64' }),
101+ 'layers' : ('json_field.fields.JSONField' , [], {'default' : "u'{}'" , 'blank' : 'True' }),
102+ 'owner' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['auth.User']" }),
103+ 'updated' : ('django.db.models.fields.DateTimeField' , [], {'auto_now' : 'True' , 'blank' : 'True' }),
104+ 'uuid' : ('api.fields.UuidField' , [], {'unique' : 'True' , 'max_length' : '32' , 'primary_key' : 'True' })
105+ },
106+ u'api.key' : {
107+ 'Meta' : {'unique_together' : "((u'owner', u'id'),)" , 'object_name' : 'Key' },
108+ 'created' : ('django.db.models.fields.DateTimeField' , [], {'auto_now_add' : 'True' , 'blank' : 'True' }),
109+ 'id' : ('django.db.models.fields.CharField' , [], {'max_length' : '128' }),
110+ 'owner' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['auth.User']" }),
111+ 'public' : ('django.db.models.fields.TextField' , [], {}),
112+ 'updated' : ('django.db.models.fields.DateTimeField' , [], {'auto_now' : 'True' , 'blank' : 'True' }),
113+ 'uuid' : ('api.fields.UuidField' , [], {'unique' : 'True' , 'max_length' : '32' , 'primary_key' : 'True' })
114+ },
115+ u'api.layer' : {
116+ 'Meta' : {'unique_together' : "((u'formation', u'id'),)" , 'object_name' : 'Layer' },
117+ 'chef_version' : ('django.db.models.fields.CharField' , [], {'default' : "u'11.4.4'" , 'max_length' : '32' }),
118+ 'created' : ('django.db.models.fields.DateTimeField' , [], {'auto_now_add' : 'True' , 'blank' : 'True' }),
119+ 'environment' : ('django.db.models.fields.CharField' , [], {'default' : "u'_default'" , 'max_length' : '64' }),
120+ 'flavor' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['api.Flavor']" }),
121+ 'formation' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['api.Formation']" }),
122+ 'id' : ('django.db.models.fields.SlugField' , [], {'max_length' : '64' }),
123+ 'initial_attributes' : ('json_field.fields.JSONField' , [], {'default' : "u'{}'" , 'blank' : 'True' }),
124+ 'level' : ('django.db.models.fields.PositiveIntegerField' , [], {'default' : '0' }),
125+ 'owner' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['auth.User']" }),
126+ 'run_list' : ('django.db.models.fields.CharField' , [], {'max_length' : '512' }),
127+ 'ssh_private_key' : ('django.db.models.fields.TextField' , [], {}),
128+ 'ssh_public_key' : ('django.db.models.fields.TextField' , [], {}),
129+ 'ssh_username' : ('django.db.models.fields.CharField' , [], {'default' : "u'ubuntu'" , 'max_length' : '64' }),
130+ 'updated' : ('django.db.models.fields.DateTimeField' , [], {'auto_now' : 'True' , 'blank' : 'True' }),
131+ 'uuid' : ('api.fields.UuidField' , [], {'unique' : 'True' , 'max_length' : '32' , 'primary_key' : 'True' })
132+ },
133+ u'api.node' : {
134+ 'Meta' : {'unique_together' : "((u'formation', u'id'),)" , 'object_name' : 'Node' },
135+ 'created' : ('django.db.models.fields.DateTimeField' , [], {'auto_now_add' : 'True' , 'blank' : 'True' }),
136+ 'formation' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['api.Formation']" }),
137+ 'fqdn' : ('django.db.models.fields.CharField' , [], {'max_length' : '256' , 'null' : 'True' , 'blank' : 'True' }),
138+ 'id' : ('django.db.models.fields.CharField' , [], {'max_length' : '64' }),
139+ 'layer' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['api.Layer']" }),
140+ 'num' : ('django.db.models.fields.PositiveIntegerField' , [], {}),
141+ 'owner' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['auth.User']" }),
142+ 'provider_id' : ('django.db.models.fields.SlugField' , [], {'max_length' : '64' , 'null' : 'True' , 'blank' : 'True' }),
143+ 'status' : ('api.fields.NodeStatusField' , [], {'default' : "u'null'" , 'null' : 'True' , 'blank' : 'True' }),
144+ 'updated' : ('django.db.models.fields.DateTimeField' , [], {'auto_now' : 'True' , 'blank' : 'True' }),
145+ 'uuid' : ('api.fields.UuidField' , [], {'unique' : 'True' , 'max_length' : '32' , 'primary_key' : 'True' })
146+ },
147+ u'api.provider' : {
148+ 'Meta' : {'unique_together' : "((u'owner', u'id'),)" , 'object_name' : 'Provider' },
149+ 'created' : ('django.db.models.fields.DateTimeField' , [], {'auto_now_add' : 'True' , 'blank' : 'True' }),
150+ 'creds' : ('api.fields.CredentialsField' , [], {'default' : "u'null'" }),
151+ 'id' : ('django.db.models.fields.SlugField' , [], {'max_length' : '64' }),
152+ 'owner' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['auth.User']" }),
153+ 'type' : ('django.db.models.fields.SlugField' , [], {'max_length' : '16' }),
154+ 'updated' : ('django.db.models.fields.DateTimeField' , [], {'auto_now' : 'True' , 'blank' : 'True' }),
155+ 'uuid' : ('api.fields.UuidField' , [], {'unique' : 'True' , 'max_length' : '32' , 'primary_key' : 'True' })
156+ },
157+ u'api.release' : {
158+ 'Meta' : {'ordering' : "[u'-created']" , 'unique_together' : "((u'formation', u'version'),)" , 'object_name' : 'Release' },
159+ 'build' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['api.Build']" , 'null' : 'True' , 'blank' : 'True' }),
160+ 'config' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['api.Config']" }),
161+ 'created' : ('django.db.models.fields.DateTimeField' , [], {'auto_now_add' : 'True' , 'blank' : 'True' }),
162+ 'formation' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['api.Formation']" }),
163+ 'image' : ('django.db.models.fields.CharField' , [], {'default' : "u'deis/buildstep'" , 'max_length' : '256' }),
164+ 'owner' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['auth.User']" }),
165+ 'updated' : ('django.db.models.fields.DateTimeField' , [], {'auto_now' : 'True' , 'blank' : 'True' }),
166+ 'uuid' : ('api.fields.UuidField' , [], {'unique' : 'True' , 'max_length' : '32' , 'primary_key' : 'True' }),
167+ 'version' : ('django.db.models.fields.PositiveIntegerField' , [], {})
168+ },
169+ u'auth.group' : {
170+ 'Meta' : {'object_name' : 'Group' },
171+ u'id' : ('django.db.models.fields.AutoField' , [], {'primary_key' : 'True' }),
172+ 'name' : ('django.db.models.fields.CharField' , [], {'unique' : 'True' , 'max_length' : '80' }),
173+ 'permissions' : ('django.db.models.fields.related.ManyToManyField' , [], {'to' : u"orm['auth.Permission']" , 'symmetrical' : 'False' , 'blank' : 'True' })
174+ },
175+ u'auth.permission' : {
176+ 'Meta' : {'ordering' : "(u'content_type__app_label', u'content_type__model', u'codename')" , 'unique_together' : "((u'content_type', u'codename'),)" , 'object_name' : 'Permission' },
177+ 'codename' : ('django.db.models.fields.CharField' , [], {'max_length' : '100' }),
178+ 'content_type' : ('django.db.models.fields.related.ForeignKey' , [], {'to' : u"orm['contenttypes.ContentType']" }),
179+ u'id' : ('django.db.models.fields.AutoField' , [], {'primary_key' : 'True' }),
180+ 'name' : ('django.db.models.fields.CharField' , [], {'max_length' : '50' })
181+ },
182+ u'auth.user' : {
183+ 'Meta' : {'object_name' : 'User' },
184+ 'date_joined' : ('django.db.models.fields.DateTimeField' , [], {'default' : 'datetime.datetime.now' }),
185+ 'email' : ('django.db.models.fields.EmailField' , [], {'max_length' : '75' , 'blank' : 'True' }),
186+ 'first_name' : ('django.db.models.fields.CharField' , [], {'max_length' : '30' , 'blank' : 'True' }),
187+ 'groups' : ('django.db.models.fields.related.ManyToManyField' , [], {'to' : u"orm['auth.Group']" , 'symmetrical' : 'False' , 'blank' : 'True' }),
188+ u'id' : ('django.db.models.fields.AutoField' , [], {'primary_key' : 'True' }),
189+ 'is_active' : ('django.db.models.fields.BooleanField' , [], {'default' : 'True' }),
190+ 'is_staff' : ('django.db.models.fields.BooleanField' , [], {'default' : 'False' }),
191+ 'is_superuser' : ('django.db.models.fields.BooleanField' , [], {'default' : 'False' }),
192+ 'last_login' : ('django.db.models.fields.DateTimeField' , [], {'default' : 'datetime.datetime.now' }),
193+ 'last_name' : ('django.db.models.fields.CharField' , [], {'max_length' : '30' , 'blank' : 'True' }),
194+ 'password' : ('django.db.models.fields.CharField' , [], {'max_length' : '128' }),
195+ 'user_permissions' : ('django.db.models.fields.related.ManyToManyField' , [], {'to' : u"orm['auth.Permission']" , 'symmetrical' : 'False' , 'blank' : 'True' }),
196+ 'username' : ('django.db.models.fields.CharField' , [], {'unique' : 'True' , 'max_length' : '30' })
197+ },
198+ u'contenttypes.contenttype' : {
199+ 'Meta' : {'ordering' : "('name',)" , 'unique_together' : "(('app_label', 'model'),)" , 'object_name' : 'ContentType' , 'db_table' : "'django_content_type'" },
200+ 'app_label' : ('django.db.models.fields.CharField' , [], {'max_length' : '100' }),
201+ u'id' : ('django.db.models.fields.AutoField' , [], {'primary_key' : 'True' }),
202+ 'model' : ('django.db.models.fields.CharField' , [], {'max_length' : '100' }),
203+ 'name' : ('django.db.models.fields.CharField' , [], {'max_length' : '100' })
204+ }
205+ }
206+
207+ complete_apps = ['api' ]
0 commit comments