6380c0faf48dca7f3940f41beeaeb49de5b09838
[wolnelektury.git] / src / paypal / migrations / 0001_initial.py
1 from django.db import migrations, models
2 import django.db.models.deletion
3 from django.conf import settings
4
5
6 class Migration(migrations.Migration):
7
8     dependencies = [
9         migrations.swappable_dependency(settings.AUTH_USER_MODEL),
10     ]
11
12     operations = [
13         migrations.CreateModel(
14             name='BillingAgreement',
15             fields=[
16                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
17                 ('agreement_id', models.CharField(max_length=32)),
18                 ('active', models.BooleanField(max_length=32)),
19             ],
20         ),
21         migrations.CreateModel(
22             name='BillingPlan',
23             fields=[
24                 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
25                 ('plan_id', models.CharField(max_length=32)),
26                 ('amount', models.IntegerField(unique=True, db_index=True)),
27             ],
28         ),
29         migrations.AddField(
30             model_name='billingagreement',
31             name='plan',
32             field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='paypal.BillingPlan'),
33         ),
34         migrations.AddField(
35             model_name='billingagreement',
36             name='user',
37             field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
38         ),
39     ]