mirror of
https://github.com/retspen/webvirtcloud
synced 2025-02-15 17:05:17 +00:00
The django.core.urlresolvers module is removed in favor of its new location, django.urls. The on_delete argument for ForeignKey and OneToOneField is required in models and migrations.
24 lines
832 B
Python
24 lines
832 B
Python
from django.db import models, migrations
|
|
from django.conf import settings
|
|
from django.db.models import CASCADE
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
('accounts', '0003_usersshkey'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='UserAttributes',
|
|
fields=[
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
|
('max_instances', models.IntegerField(default=0)),
|
|
('max_cpus', models.IntegerField(default=0)),
|
|
('max_memory', models.IntegerField(default=0)),
|
|
('user', models.OneToOneField(to=settings.AUTH_USER_MODEL, on_delete=CASCADE)),
|
|
],
|
|
),
|
|
]
|