From f3ca9110e1658fcdc6f73a70237d6bc59f8a43c1 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 15 Oct 2017 19:56:40 +0200 Subject: [PATCH] Add UserCardDetail migration --- hosting/migrations/0044_usercarddetail.py | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 hosting/migrations/0044_usercarddetail.py diff --git a/hosting/migrations/0044_usercarddetail.py b/hosting/migrations/0044_usercarddetail.py new file mode 100644 index 00000000..d5264cb4 --- /dev/null +++ b/hosting/migrations/0044_usercarddetail.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2017-10-15 17:42 +from __future__ import unicode_literals + +import django.db.models.deletion +from django.conf import settings +from django.db import migrations, models + +import utils.mixins + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('hosting', '0043_vmdetail'), + ] + + operations = [ + migrations.CreateModel( + name='UserCardDetail', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('stripe_customer_id', models.CharField(max_length=100, unique=True)), + ('last4', models.CharField(max_length=4)), + ('brand', models.CharField(max_length=10)), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + options={ + 'permissions': (('view_usercarddetail', 'View User Card'),), + }, + bases=(utils.mixins.AssignPermissionsMixin, models.Model), + ), + ]