From 67231275c74e3dc5055a24f79999eb1b6c7a5101 Mon Sep 17 00:00:00 2001 From: PCoder Date: Tue, 25 Sep 2018 02:19:28 +0200 Subject: [PATCH] Modify migration --- hosting/migrations/0048_auto_20180924_2354.py | 44 +++++++++++++++++++ .../0048_hostingorder_generic_payment_id.py | 20 --------- 2 files changed, 44 insertions(+), 20 deletions(-) create mode 100644 hosting/migrations/0048_auto_20180924_2354.py delete mode 100644 hosting/migrations/0048_hostingorder_generic_payment_id.py diff --git a/hosting/migrations/0048_auto_20180924_2354.py b/hosting/migrations/0048_auto_20180924_2354.py new file mode 100644 index 00000000..f7fbf8ac --- /dev/null +++ b/hosting/migrations/0048_auto_20180924_2354.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2018-09-24 23:54 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion +import filer.fields.image +import utils.mixins + + +class Migration(migrations.Migration): + + dependencies = [ + ('filer', '0005_auto_20180217_1137'), + ('hosting', '0047_auto_20180821_1240'), + ] + + operations = [ + migrations.CreateModel( + name='GenericProduct', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('product_name', models.CharField(default='', max_length=128)), + ('product_description', models.CharField(default='', max_length=500)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('product_url', models.URLField(blank=True, max_length=1000, null=True)), + ('product_price', models.DecimalField(decimal_places=2, max_digits=6)), + ('product_vat', models.DecimalField(decimal_places=4, default=0, max_digits=6)), + ('product_is_subscription', models.BooleanField(default=True)), + ('product_image', filer.fields.image.FilerImageField(blank=True, help_text='The product image', null=True, on_delete=django.db.models.deletion.CASCADE, to='filer.Image')), + ], + bases=(utils.mixins.AssignPermissionsMixin, models.Model), + ), + migrations.AddField( + model_name='hostingorder', + name='generic_payment_description', + field=models.CharField(max_length=500, null=True), + ), + migrations.AddField( + model_name='hostingorder', + name='generic_product', + field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='hosting.GenericProduct'), + ), + ] diff --git a/hosting/migrations/0048_hostingorder_generic_payment_id.py b/hosting/migrations/0048_hostingorder_generic_payment_id.py deleted file mode 100644 index 36488efb..00000000 --- a/hosting/migrations/0048_hostingorder_generic_payment_id.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9.4 on 2018-09-23 09:34 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('hosting', '0047_auto_20180821_1240'), - ] - - operations = [ - migrations.AddField( - model_name='hostingorder', - name='generic_payment_id', - field=models.CharField(editable=False, max_length=128, null=True), - ), - ]