|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +from south.utils import datetime_utils as datetime |
| 3 | +from south.db import db |
| 4 | +from south.v2 import SchemaMigration |
| 5 | +from django.db import models |
| 6 | +from django.db.utils import OperationalError |
| 7 | + |
| 8 | + |
| 9 | +class Migration(SchemaMigration): |
| 10 | + |
| 11 | + def forwards(self, orm): |
| 12 | + # Drop django-celery tables |
| 13 | + try: |
| 14 | + db.delete_table('djcelery_taskstate', cascade=True) |
| 15 | + db.delete_table('djcelery_workerstate', cascade=True) |
| 16 | + db.delete_table('djcelery_periodictask', cascade=True) |
| 17 | + db.delete_table('djcelery_periodictasks', cascade=True) |
| 18 | + db.delete_table('djcelery_crontabschedule', cascade=True) |
| 19 | + db.delete_table('djcelery_intervalschedule', cascade=True) |
| 20 | + db.delete_table('celery_tasksetmeta', cascade=True) |
| 21 | + db.delete_table('celery_taskmeta', cascade=True) |
| 22 | + except OperationalError: |
| 23 | + pass |
| 24 | + # Drop django-allauth.socialaccount tables |
| 25 | + try: |
| 26 | + db.delete_table('socialaccount_socialtoken', cascade=True) |
| 27 | + db.delete_table('socialaccount_socialaccount', cascade=True) |
| 28 | + db.delete_table('socialaccount_socialapp', cascade=True) |
| 29 | + db.delete_table('socialaccount_socialapp_sites', cascade=True) |
| 30 | + except OperationalError: |
| 31 | + pass |
| 32 | + |
| 33 | + def backwards(self, orm): |
| 34 | + pass |
| 35 | + |
| 36 | + models = { |
| 37 | + u'api.app': { |
| 38 | + 'Meta': {'object_name': 'App'}, |
| 39 | + 'containers': ('json_field.fields.JSONField', [], {'default': "u'{}'", 'blank': 'True'}), |
| 40 | + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), |
| 41 | + 'formation': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Formation']"}), |
| 42 | + 'id': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '64'}), |
| 43 | + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), |
| 44 | + 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), |
| 45 | + 'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) |
| 46 | + }, |
| 47 | + u'api.build': { |
| 48 | + 'Meta': {'ordering': "[u'-created']", 'unique_together': "((u'app', u'uuid'),)", 'object_name': 'Build'}, |
| 49 | + 'app': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.App']"}), |
| 50 | + 'checksum': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), |
| 51 | + 'config': ('json_field.fields.JSONField', [], {'default': "u'null'", 'blank': 'True'}), |
| 52 | + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), |
| 53 | + 'dockerfile': ('django.db.models.fields.TextField', [], {'blank': 'True'}), |
| 54 | + 'image': ('django.db.models.fields.CharField', [], {'default': "u'deis/buildstep'", 'max_length': '256'}), |
| 55 | + 'output': ('django.db.models.fields.TextField', [], {'blank': 'True'}), |
| 56 | + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), |
| 57 | + 'procfile': ('json_field.fields.JSONField', [], {'default': "u'null'", 'blank': 'True'}), |
| 58 | + 'sha': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), |
| 59 | + 'size': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), |
| 60 | + 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), |
| 61 | + 'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}), |
| 62 | + 'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) |
| 63 | + }, |
| 64 | + u'api.config': { |
| 65 | + 'Meta': {'ordering': "[u'-created']", 'unique_together': "((u'app', u'version'),)", 'object_name': 'Config'}, |
| 66 | + 'app': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.App']"}), |
| 67 | + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), |
| 68 | + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), |
| 69 | + 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), |
| 70 | + 'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}), |
| 71 | + 'values': ('json_field.fields.JSONField', [], {'default': "u'{}'", 'blank': 'True'}), |
| 72 | + 'version': ('django.db.models.fields.PositiveIntegerField', [], {}) |
| 73 | + }, |
| 74 | + u'api.container': { |
| 75 | + 'Meta': {'ordering': "[u'created']", 'unique_together': "((u'app', u'type', u'num'), (u'formation', u'port'))", 'object_name': 'Container'}, |
| 76 | + 'app': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.App']"}), |
| 77 | + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), |
| 78 | + 'formation': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Formation']"}), |
| 79 | + 'node': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Node']"}), |
| 80 | + 'num': ('django.db.models.fields.PositiveIntegerField', [], {}), |
| 81 | + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), |
| 82 | + 'port': ('django.db.models.fields.PositiveIntegerField', [], {}), |
| 83 | + 'status': ('django.db.models.fields.CharField', [], {'default': "u'up'", 'max_length': '64'}), |
| 84 | + 'type': ('django.db.models.fields.CharField', [], {'max_length': '128'}), |
| 85 | + 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), |
| 86 | + 'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) |
| 87 | + }, |
| 88 | + u'api.flavor': { |
| 89 | + 'Meta': {'unique_together': "((u'owner', u'id'),)", 'object_name': 'Flavor'}, |
| 90 | + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), |
| 91 | + 'id': ('django.db.models.fields.SlugField', [], {'max_length': '64'}), |
| 92 | + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), |
| 93 | + 'params': ('json_field.fields.JSONField', [], {'default': "u'null'", 'blank': 'True'}), |
| 94 | + 'provider': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Provider']"}), |
| 95 | + 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), |
| 96 | + 'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) |
| 97 | + }, |
| 98 | + u'api.formation': { |
| 99 | + 'Meta': {'unique_together': "((u'owner', u'id'),)", 'object_name': 'Formation'}, |
| 100 | + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), |
| 101 | + 'domain': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}), |
| 102 | + 'id': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '64'}), |
| 103 | + 'nodes': ('json_field.fields.JSONField', [], {'default': "u'{}'", 'blank': 'True'}), |
| 104 | + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), |
| 105 | + 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), |
| 106 | + 'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) |
| 107 | + }, |
| 108 | + u'api.key': { |
| 109 | + 'Meta': {'unique_together': "((u'owner', u'id'),)", 'object_name': 'Key'}, |
| 110 | + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), |
| 111 | + 'id': ('django.db.models.fields.CharField', [], {'max_length': '128'}), |
| 112 | + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), |
| 113 | + 'public': ('django.db.models.fields.TextField', [], {'unique': 'True'}), |
| 114 | + 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), |
| 115 | + 'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) |
| 116 | + }, |
| 117 | + u'api.layer': { |
| 118 | + 'Meta': {'unique_together': "((u'formation', u'id'),)", 'object_name': 'Layer'}, |
| 119 | + 'config': ('json_field.fields.JSONField', [], {'default': "u'{}'", 'blank': 'True'}), |
| 120 | + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), |
| 121 | + 'flavor': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Flavor']"}), |
| 122 | + 'formation': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Formation']"}), |
| 123 | + 'id': ('django.db.models.fields.SlugField', [], {'max_length': '64'}), |
| 124 | + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), |
| 125 | + 'proxy': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
| 126 | + 'runtime': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
| 127 | + 'ssh_port': ('django.db.models.fields.SmallIntegerField', [], {'default': '22'}), |
| 128 | + 'ssh_private_key': ('django.db.models.fields.TextField', [], {}), |
| 129 | + 'ssh_public_key': ('django.db.models.fields.TextField', [], {}), |
| 130 | + 'ssh_username': ('django.db.models.fields.CharField', [], {'default': "u'ubuntu'", 'max_length': '64'}), |
| 131 | + 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), |
| 132 | + 'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) |
| 133 | + }, |
| 134 | + u'api.node': { |
| 135 | + 'Meta': {'unique_together': "((u'formation', u'id'),)", 'object_name': 'Node'}, |
| 136 | + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), |
| 137 | + 'formation': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Formation']"}), |
| 138 | + 'fqdn': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}), |
| 139 | + 'id': ('django.db.models.fields.CharField', [], {'max_length': '64'}), |
| 140 | + 'layer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Layer']"}), |
| 141 | + 'num': ('django.db.models.fields.PositiveIntegerField', [], {}), |
| 142 | + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), |
| 143 | + 'provider_id': ('django.db.models.fields.SlugField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}), |
| 144 | + 'status': ('json_field.fields.JSONField', [], {'default': "u'null'", 'null': 'True', 'blank': 'True'}), |
| 145 | + 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), |
| 146 | + 'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) |
| 147 | + }, |
| 148 | + u'api.provider': { |
| 149 | + 'Meta': {'unique_together': "((u'owner', u'id'),)", 'object_name': 'Provider'}, |
| 150 | + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), |
| 151 | + 'creds': ('json_field.fields.JSONField', [], {'default': "u'null'", 'blank': 'True'}), |
| 152 | + 'id': ('django.db.models.fields.SlugField', [], {'max_length': '64'}), |
| 153 | + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), |
| 154 | + 'type': ('django.db.models.fields.SlugField', [], {'max_length': '16'}), |
| 155 | + 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), |
| 156 | + 'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) |
| 157 | + }, |
| 158 | + u'api.release': { |
| 159 | + 'Meta': {'ordering': "[u'-created']", 'unique_together': "((u'app', u'version'),)", 'object_name': 'Release'}, |
| 160 | + 'app': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.App']"}), |
| 161 | + 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Build']", 'null': 'True', 'blank': 'True'}), |
| 162 | + 'config': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Config']"}), |
| 163 | + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), |
| 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), |
| 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', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), |
| 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