mirror of
https://github.com/retspen/webvirtcloud
synced 2024-10-31 19:44:16 +00:00
add more default machine type and instance type
This commit is contained in:
parent
c804b2cde8
commit
ea6524f79e
1 changed files with 21 additions and 0 deletions
21
appsettings/migrations/0007_auto_20220905_0918.py
Normal file
21
appsettings/migrations/0007_auto_20220905_0918.py
Normal 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)
|
||||
]
|
Loading…
Reference in a new issue