Files
awx/awx/main/migrations/0020_v330_instancegroup_policies.py
Jeff Bradberry e3f3ab224a Replace all previously text-based json fields with JSONBlob
This JSONBlob field type is a wrapper around Django's new generic
JSONField, but with the database column type forced to be text.  This
should behave close enough to our old wrapper around
django-jsonfield's JSONField and will avoid needing to do the
out-of-band database migration.
2022-03-24 15:21:54 -04:00

45 lines
1.9 KiB
Python

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from decimal import Decimal
from django.db import migrations, models
import awx.main.fields
class Migration(migrations.Migration):
dependencies = [
('main', '0019_v330_custom_virtualenv'),
]
operations = [
migrations.AddField(
model_name='instancegroup',
name='policy_instance_list',
field=awx.main.fields.JSONBlob(
default=list, help_text='List of exact-match Instances that will always be automatically assigned to this group', blank=True
),
),
migrations.AddField(
model_name='instancegroup',
name='policy_instance_minimum',
field=models.IntegerField(default=0, help_text='Static minimum number of Instances to automatically assign to this group'),
),
migrations.AddField(
model_name='instancegroup',
name='policy_instance_percentage',
field=models.IntegerField(default=0, help_text='Percentage of Instances to automatically assign to this group'),
),
migrations.AddField(
model_name='instance',
name='capacity_adjustment',
field=models.DecimalField(decimal_places=2, default=Decimal('1.0'), max_digits=3),
),
migrations.AddField(model_name='instance', name='cpu', field=models.IntegerField(default=0, editable=False)),
migrations.AddField(model_name='instance', name='memory', field=models.BigIntegerField(default=0, editable=False)),
migrations.AddField(model_name='instance', name='cpu_capacity', field=models.IntegerField(default=0, editable=False)),
migrations.AddField(model_name='instance', name='mem_capacity', field=models.IntegerField(default=0, editable=False)),
migrations.AddField(model_name='instance', name='enabled', field=models.BooleanField(default=True)),
]