From 3a37343a7345a14406ba7b97e1cebbc596d24cda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= Date: Thu, 9 Apr 2020 14:28:46 +0200 Subject: [PATCH] Set default value for vpnnetworkreservation, rebuild migrations --- .../migrations/0002_auto_20200409_1225.py | 24 +++++++++++++++++++ .../uncloud/uncloud_net/models.py | 1 + .../migrations/0004_auto_20200409_1225.py | 23 ++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 uncloud_django_based/uncloud/uncloud_net/migrations/0002_auto_20200409_1225.py create mode 100644 uncloud_django_based/uncloud/uncloud_pay/migrations/0004_auto_20200409_1225.py diff --git a/uncloud_django_based/uncloud/uncloud_net/migrations/0002_auto_20200409_1225.py b/uncloud_django_based/uncloud/uncloud_net/migrations/0002_auto_20200409_1225.py new file mode 100644 index 0000000..fcc2374 --- /dev/null +++ b/uncloud_django_based/uncloud/uncloud_net/migrations/0002_auto_20200409_1225.py @@ -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'), + ), + ] diff --git a/uncloud_django_based/uncloud/uncloud_net/models.py b/uncloud_django_based/uncloud/uncloud_net/models.py index 2eaf92d..e5251bd 100644 --- a/uncloud_django_based/uncloud/uncloud_net/models.py +++ b/uncloud_django_based/uncloud/uncloud_net/models.py @@ -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') diff --git a/uncloud_django_based/uncloud/uncloud_pay/migrations/0004_auto_20200409_1225.py b/uncloud_django_based/uncloud/uncloud_pay/migrations/0004_auto_20200409_1225.py new file mode 100644 index 0000000..32aac87 --- /dev/null +++ b/uncloud_django_based/uncloud/uncloud_pay/migrations/0004_auto_20200409_1225.py @@ -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(), + ), + ]