edit buttons
[wolnelektury.git] / src / paypal / migrations / 0001_initial.py
1 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
3 #
4 from django.db import migrations, models
5 import django.db.models.deletion
6 from django.conf import settings
7
8
9 class Migration(migrations.Migration):
10
11     dependencies = [
12         migrations.swappable_dependency(settings.AUTH_USER_MODEL),
13     ]
14
15     operations = [
16         migrations.CreateModel(
17             name='BillingAgreement',
18             fields=[
19                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
20                 ('agreement_id', models.CharField(max_length=32)),
21                 ('active', models.BooleanField(max_length=32)),
22             ],
23         ),
24         migrations.CreateModel(
25             name='BillingPlan',
26             fields=[
27                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
28                 ('plan_id', models.CharField(max_length=32)),
29                 ('amount', models.IntegerField(unique=True, db_index=True)),
30             ],
31         ),
32         migrations.AddField(
33             model_name='billingagreement',
34             name='plan',
35             field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='paypal.BillingPlan'),
36         ),
37         migrations.AddField(
38             model_name='billingagreement',
39             name='user',
40             field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
41         ),
42     ]