From 0bc8c350312216baf3a23ea3d2d1a366eefe6ae8 Mon Sep 17 00:00:00 2001 From: PCoder Date: Wed, 3 Apr 2019 06:13:12 +0200 Subject: [PATCH] Add migration --- hosting/migrations/0050_monthlyhostingbill.py | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 hosting/migrations/0050_monthlyhostingbill.py diff --git a/hosting/migrations/0050_monthlyhostingbill.py b/hosting/migrations/0050_monthlyhostingbill.py new file mode 100644 index 00000000..34d29e68 --- /dev/null +++ b/hosting/migrations/0050_monthlyhostingbill.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2019-04-03 03:47 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion +import utils.mixins + + +class Migration(migrations.Migration): + + dependencies = [ + ('membership', '0007_auto_20180213_0128'), + ('hosting', '0049_auto_20181005_0736'), + ] + + operations = [ + migrations.CreateModel( + name='MonthlyHostingBill', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('created', models.DateTimeField(help_text='When the invoice was created')), + ('receipt_number', models.CharField(help_text='The receipt number that is generated on Stripe', max_length=100)), + ('invoice_number', models.CharField(help_text='The invoice number that is generated on Stripe', max_length=100)), + ('paid_at', models.DateTimeField(help_text='Date on which the bill was paid')), + ('period_start', models.DateTimeField()), + ('period_end', models.DateTimeField()), + ('billing_reason', models.CharField(max_length=25)), + ('discount', models.PositiveIntegerField()), + ('total', models.IntegerField()), + ('lines_data_count', models.IntegerField()), + ('invoice_id', models.CharField(max_length=100, unique=True)), + ('lines_meta_data_csv', models.TextField()), + ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='membership.StripeCustomer')), + ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hosting.HostingOrder')), + ], + options={ + 'permissions': (('view_monthlyhostingbill', 'View Monthly Hosting'),), + }, + bases=(utils.mixins.AssignPermissionsMixin, models.Model), + ), + ]