mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 15:15:22 +00:00
django on_delete statement is must after than
This commit is contained in:
parent
b05a252d7c
commit
aa32d826d9
4 changed files with 62 additions and 4 deletions
36
accounts/migrations/0014_auto_20180808_1436.py
Normal file
36
accounts/migrations/0014_auto_20180808_1436.py
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.11.13 on 2018-08-08 11:36
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import django.core.validators
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('accounts', '0013_auto_20180625_1358'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='userattributes',
|
||||||
|
name='max_cpus',
|
||||||
|
field=models.IntegerField(default=1, help_text=b'-1 for unlimited. Any integer value', validators=[django.core.validators.MinValueValidator(-1)]),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='userattributes',
|
||||||
|
name='max_disk_size',
|
||||||
|
field=models.IntegerField(default=20, help_text=b'-1 for unlimited. Any integer value', validators=[django.core.validators.MinValueValidator(-1)]),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='userattributes',
|
||||||
|
name='max_instances',
|
||||||
|
field=models.IntegerField(default=1, help_text=b'-1 for unlimited. Any integer value', validators=[django.core.validators.MinValueValidator(-1)]),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='userattributes',
|
||||||
|
name='max_memory',
|
||||||
|
field=models.IntegerField(default=2048, help_text=b'-1 for unlimited. Any integer value', validators=[django.core.validators.MinValueValidator(-1)]),
|
||||||
|
),
|
||||||
|
]
|
22
accounts/migrations/0015_auto_20180808_1449.py
Normal file
22
accounts/migrations/0015_auto_20180808_1449.py
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.11.13 on 2018-08-08 11:49
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('accounts', '0014_auto_20180808_1436'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='usersshkey',
|
||||||
|
name='user',
|
||||||
|
field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL),
|
||||||
|
),
|
||||||
|
]
|
|
@ -6,8 +6,8 @@ from django.core.validators import MinValueValidator
|
||||||
|
|
||||||
|
|
||||||
class UserInstance(models.Model):
|
class UserInstance(models.Model):
|
||||||
user = models.ForeignKey(User)
|
user = models.ForeignKey(User, on_delete=models.CASCADE)
|
||||||
instance = models.ForeignKey(Instance)
|
instance = models.ForeignKey(Instance, on_delete=models.CASCADE)
|
||||||
is_change = models.BooleanField(default=False)
|
is_change = models.BooleanField(default=False)
|
||||||
is_delete = models.BooleanField(default=False)
|
is_delete = models.BooleanField(default=False)
|
||||||
is_vnc = models.BooleanField(default=False)
|
is_vnc = models.BooleanField(default=False)
|
||||||
|
@ -17,7 +17,7 @@ class UserInstance(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class UserSSHKey(models.Model):
|
class UserSSHKey(models.Model):
|
||||||
user = models.ForeignKey(User)
|
user = models.ForeignKey(User, on_delete=models.DO_NOTHING)
|
||||||
keyname = models.CharField(max_length=25)
|
keyname = models.CharField(max_length=25)
|
||||||
keypublic = models.CharField(max_length=500)
|
keypublic = models.CharField(max_length=500)
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ from computes.models import Compute
|
||||||
|
|
||||||
|
|
||||||
class Instance(models.Model):
|
class Instance(models.Model):
|
||||||
compute = models.ForeignKey(Compute)
|
compute = models.ForeignKey(Compute, on_delete=models.CASCADE)
|
||||||
name = models.CharField(max_length=120)
|
name = models.CharField(max_length=120)
|
||||||
uuid = models.CharField(max_length=36)
|
uuid = models.CharField(max_length=36)
|
||||||
is_template = models.BooleanField(default=False)
|
is_template = models.BooleanField(default=False)
|
||||||
|
|
Loading…
Reference in a new issue