mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-05-26 07:08:05 +00:00
django on_delete statement is must after than
This commit is contained in:
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):
|
||||
user = models.ForeignKey(User)
|
||||
instance = models.ForeignKey(Instance)
|
||||
user = models.ForeignKey(User, on_delete=models.CASCADE)
|
||||
instance = models.ForeignKey(Instance, on_delete=models.CASCADE)
|
||||
is_change = models.BooleanField(default=False)
|
||||
is_delete = models.BooleanField(default=False)
|
||||
is_vnc = models.BooleanField(default=False)
|
||||
@@ -17,7 +17,7 @@ class UserInstance(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)
|
||||
keypublic = models.CharField(max_length=500)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ from computes.models import Compute
|
||||
|
||||
|
||||
class Instance(models.Model):
|
||||
compute = models.ForeignKey(Compute)
|
||||
compute = models.ForeignKey(Compute, on_delete=models.CASCADE)
|
||||
name = models.CharField(max_length=120)
|
||||
uuid = models.CharField(max_length=36)
|
||||
is_template = models.BooleanField(default=False)
|
||||
|
||||
Reference in New Issue
Block a user