Set default value for vpnnetworkreservation, rebuild migrations

This commit is contained in:
fnux 2020-04-09 14:28:46 +02:00
parent 3588ae88f9
commit 3a37343a73
3 changed files with 48 additions and 0 deletions

View file

@ -0,0 +1,24 @@
# Generated by Django 3.0.5 on 2020-04-09 12:25
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('uncloud_net', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='vpnnetworkreservation',
name='status',
field=models.CharField(choices=[('used', 'used'), ('free', 'free')], default='used', max_length=256),
),
migrations.AlterField(
model_name='vpnnetwork',
name='network',
field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to='uncloud_net.VPNNetworkReservation'),
),
]

View file

@ -100,6 +100,7 @@ class VPNNetworkReservation(UncloudModel):
address = models.GenericIPAddressField(primary_key=True)
status = models.CharField(max_length=256,
default='used',
choices = (
('used', 'used'),
('free', 'free')

View file

@ -0,0 +1,23 @@
# Generated by Django 3.0.5 on 2020-04-09 12:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('uncloud_pay', '0003_auto_20200305_1354'),
]
operations = [
migrations.AlterField(
model_name='order',
name='recurring_period',
field=models.CharField(choices=[('ONCE', 'Onetime'), ('YEAR', 'Per Year'), ('MONTH', 'Per Month'), ('MINUTE', 'Per Minute'), ('WEEK', 'Per Week'), ('DAY', 'Per Day'), ('HOUR', 'Per Hour'), ('SECOND', 'Per Second')], default='MONTH', max_length=32),
),
migrations.AlterField(
model_name='order',
name='starting_date',
field=models.DateTimeField(),
),
]