Plain is headed towards 1.0! Subscribe for development updates →

 1# Generated by Plain 4.0.3 on 2022-03-16 19:11
 2
 3import plain.models.deletion
 4from plain import models
 5from plain.models import migrations
 6from plain.runtime import settings
 7
 8
 9class Migration(migrations.Migration):
10    initial = True
11
12    dependencies = [
13        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
14    ]
15
16    operations = [
17        migrations.CreateModel(
18            name="OAuthConnection",
19            fields=[
20                (
21                    "id",
22                    models.BigAutoField(
23                        auto_created=True,
24                        primary_key=True,
25                    ),
26                ),
27                ("created_at", models.DateTimeField(auto_now_add=True)),
28                ("updated_at", models.DateTimeField(auto_now=True)),
29                ("provider_key", models.CharField(db_index=True, max_length=100)),
30                ("provider_user_id", models.CharField(db_index=True, max_length=100)),
31                ("access_token", models.CharField(blank=True, max_length=100)),
32                ("refresh_token", models.CharField(blank=True, max_length=100)),
33                (
34                    "access_token_expires_at",
35                    models.DateTimeField(blank=True, null=True),
36                ),
37                (
38                    "refresh_token_expires_at",
39                    models.DateTimeField(blank=True, null=True),
40                ),
41                (
42                    "user",
43                    models.ForeignKey(
44                        on_delete=plain.models.deletion.CASCADE,
45                        related_name="oauth_connections",
46                        to=settings.AUTH_USER_MODEL,
47                    ),
48                ),
49            ],
50        ),
51    ]