Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coupons #506

Open
wants to merge 5 commits into
base: original
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Migrations
  • Loading branch information
Paris Kolios authored and blueyed committed Nov 20, 2017
commit 9db7ecccb6f9734eb25da7386d3e21c6cc9e1e79
58 changes: 58 additions & 0 deletions pinax/stripe/migrations/0011_coupons.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2017-11-16 14:51
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('pinax_stripe', '0010_connect'),
]

operations = [
migrations.CreateModel(
name='Discount',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('start', models.DateTimeField(null=True)),
('end', models.DateTimeField(null=True)),
],
),
migrations.AddField(
model_name='coupon',
name='stripe_account',
field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='pinax_stripe.Account'),
),
migrations.AlterField(
model_name='coupon',
name='duration',
field=models.CharField(choices=[('forever', 'forever'), ('once', 'once'), ('repeating', 'repeating')], default='once', max_length=10),
),
migrations.AlterField(
model_name='coupon',
name='stripe_id',
field=models.CharField(max_length=191),
),
migrations.AlterUniqueTogether(
name='coupon',
unique_together=set([('stripe_id', 'stripe_account')]),
),
migrations.AddField(
model_name='discount',
name='coupon',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pinax_stripe.Coupon'),
),
migrations.AddField(
model_name='discount',
name='customer',
field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to='pinax_stripe.Customer'),
),
migrations.AddField(
model_name='discount',
name='subscription',
field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to='pinax_stripe.Subscription'),
),
]