@@ -22,7 +22,7 @@ class Migration(migrations.Migration):
2222 ('updated' , models .DateTimeField (auto_now = True )),
2323 ('id' , models .SlugField (max_length = 24 , unique = True , null = True , validators = [api .models .validate_app_id , api .models .validate_reserved_names ])),
2424 ('structure' , jsonfield .fields .JSONField (default = {}, blank = True , validators = [api .models .validate_app_structure ])),
25- ('owner' , models .ForeignKey (to = settings .AUTH_USER_MODEL )),
25+ ('owner' , models .ForeignKey (to = settings .AUTH_USER_MODEL , on_delete = models . CASCADE )),
2626 ],
2727 options = {
2828 'permissions' : (('use_app' , 'Can use app' ),),
@@ -39,8 +39,8 @@ class Migration(migrations.Migration):
3939 ('sha' , models .CharField (max_length = 40 , blank = True )),
4040 ('procfile' , jsonfield .fields .JSONField (default = {}, blank = True )),
4141 ('dockerfile' , models .TextField (blank = True )),
42- ('app' , models .ForeignKey (to = 'api.App' )),
43- ('owner' , models .ForeignKey (to = settings .AUTH_USER_MODEL )),
42+ ('app' , models .ForeignKey (to = 'api.App' , on_delete = models . CASCADE )),
43+ ('owner' , models .ForeignKey (to = settings .AUTH_USER_MODEL , on_delete = models . CASCADE )),
4444 ],
4545 options = {
4646 'ordering' : ['-created' ],
@@ -58,7 +58,7 @@ class Migration(migrations.Migration):
5858 ('key' , models .TextField ()),
5959 ('common_name' , models .TextField (unique = True )),
6060 ('expires' , models .DateTimeField ()),
61- ('owner' , models .ForeignKey (to = settings .AUTH_USER_MODEL )),
61+ ('owner' , models .ForeignKey (to = settings .AUTH_USER_MODEL , on_delete = models . CASCADE )),
6262 ],
6363 options = {
6464 'abstract' : False ,
@@ -75,8 +75,8 @@ class Migration(migrations.Migration):
7575 ('memory' , jsonfield .fields .JSONField (default = {}, blank = True )),
7676 ('cpu' , jsonfield .fields .JSONField (default = {}, blank = True )),
7777 ('tags' , jsonfield .fields .JSONField (default = {}, blank = True )),
78- ('app' , models .ForeignKey (to = 'api.App' )),
79- ('owner' , models .ForeignKey (to = settings .AUTH_USER_MODEL )),
78+ ('app' , models .ForeignKey (to = 'api.App' , on_delete = models . CASCADE )),
79+ ('owner' , models .ForeignKey (to = settings .AUTH_USER_MODEL , on_delete = models . CASCADE )),
8080 ],
8181 options = {
8282 'ordering' : ['-created' ],
@@ -92,8 +92,8 @@ class Migration(migrations.Migration):
9292 ('updated' , models .DateTimeField (auto_now = True )),
9393 ('type' , models .CharField (max_length = 128 )),
9494 ('num' , models .PositiveIntegerField ()),
95- ('app' , models .ForeignKey (to = 'api.App' )),
96- ('owner' , models .ForeignKey (to = settings .AUTH_USER_MODEL )),
95+ ('app' , models .ForeignKey (to = 'api.App' , on_delete = models . CASCADE )),
96+ ('owner' , models .ForeignKey (to = settings .AUTH_USER_MODEL , on_delete = models . CASCADE )),
9797 ],
9898 options = {
9999 'ordering' : ['created' ],
@@ -108,8 +108,8 @@ class Migration(migrations.Migration):
108108 ('created' , models .DateTimeField (auto_now_add = True )),
109109 ('updated' , models .DateTimeField (auto_now = True )),
110110 ('domain' , models .TextField (unique = True )),
111- ('app' , models .ForeignKey (to = 'api.App' )),
112- ('owner' , models .ForeignKey (to = settings .AUTH_USER_MODEL )),
111+ ('app' , models .ForeignKey (to = 'api.App' , on_delete = models . CASCADE )),
112+ ('owner' , models .ForeignKey (to = settings .AUTH_USER_MODEL , on_delete = models . CASCADE )),
113113 ],
114114 options = {
115115 'abstract' : False ,
@@ -125,7 +125,7 @@ class Migration(migrations.Migration):
125125 ('id' , models .CharField (max_length = 128 )),
126126 ('public' , models .TextField (unique = True , validators = [api .models .validate_base64 ])),
127127 ('fingerprint' , models .CharField (max_length = 128 )),
128- ('owner' , models .ForeignKey (to = settings .AUTH_USER_MODEL )),
128+ ('owner' , models .ForeignKey (to = settings .AUTH_USER_MODEL , on_delete = models . CASCADE )),
129129 ],
130130 options = {
131131 'verbose_name' : 'SSH Key' ,
@@ -144,8 +144,8 @@ class Migration(migrations.Migration):
144144 ('receive_repo' , models .CharField (max_length = 255 )),
145145 ('ssh_connection' , models .CharField (max_length = 255 )),
146146 ('ssh_original_command' , models .CharField (max_length = 255 )),
147- ('app' , models .ForeignKey (to = 'api.App' )),
148- ('owner' , models .ForeignKey (to = settings .AUTH_USER_MODEL )),
147+ ('app' , models .ForeignKey (to = 'api.App' , on_delete = models . CASCADE )),
148+ ('owner' , models .ForeignKey (to = settings .AUTH_USER_MODEL , on_delete = models . CASCADE )),
149149 ],
150150 options = {
151151 'ordering' : ['-created' ],
@@ -161,10 +161,10 @@ class Migration(migrations.Migration):
161161 ('updated' , models .DateTimeField (auto_now = True )),
162162 ('version' , models .PositiveIntegerField ()),
163163 ('summary' , models .TextField (null = True , blank = True )),
164- ('app' , models .ForeignKey (to = 'api.App' )),
165- ('build' , models .ForeignKey (to = 'api.Build' , null = True )),
166- ('config' , models .ForeignKey (to = 'api.Config' )),
167- ('owner' , models .ForeignKey (to = settings .AUTH_USER_MODEL )),
164+ ('app' , models .ForeignKey (to = 'api.App' , on_delete = models . CASCADE )),
165+ ('build' , models .ForeignKey (to = 'api.Build' , null = True , on_delete = models . CASCADE )),
166+ ('config' , models .ForeignKey (to = 'api.Config' , on_delete = models . CASCADE )),
167+ ('owner' , models .ForeignKey (to = settings .AUTH_USER_MODEL , on_delete = models . CASCADE )),
168168 ],
169169 options = {
170170 'ordering' : ['-created' ],
@@ -187,7 +187,7 @@ class Migration(migrations.Migration):
187187 migrations .AddField (
188188 model_name = 'container' ,
189189 name = 'release' ,
190- field = models .ForeignKey (to = 'api.Release' ),
190+ field = models .ForeignKey (to = 'api.Release' , on_delete = models . CASCADE ),
191191 preserve_default = True ,
192192 ),
193193 migrations .AlterUniqueTogether (
0 commit comments