1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-25 15:45:23 +00:00

add more default machine type and instance type

This commit is contained in:
catborise 2022-09-05 15:39:41 +03:00
parent c804b2cde8
commit ea6524f79e

View file

@ -0,0 +1,21 @@
# Generated by Django 3.2.13 on 2022-06-30 07:17
from django.db import migrations
from django.utils.translation import gettext_lazy as _
def update_default_settings(apps, schema_editor):
setting = apps.get_model("appsettings", "AppSettings")
db_alias = schema_editor.connection.alias
setting.objects.using(db_alias).filter(key="INSTANCE_MACHINE_DEFAULT_TYPE").update(choices="q35,x86_64,virt"),
setting.objects.using(db_alias).filter(key="INSTANCE_ARCH_DEFAULT_TYPE").update(choices="x86_64,i686,aarch64"),
class Migration(migrations.Migration):
dependencies = [
('appsettings', '0006_auto_20220630_0717'),
]
operations = [
migrations.RunPython(update_default_settings, None)
]