Simple API for connecting bots.
[redakcja.git] / src / redakcja / api / migrations / 0001_initial.py
diff --git a/src/redakcja/api/migrations/0001_initial.py b/src/redakcja/api/migrations/0001_initial.py
new file mode 100644 (file)
index 0000000..cc194d1
--- /dev/null
@@ -0,0 +1,32 @@
+# Generated by Django 3.1.13 on 2021-09-10 15:04
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+    initial = True
+
+    dependencies = [
+        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='Token',
+            fields=[
+                ('key', models.CharField(max_length=40, primary_key=True, serialize=False, verbose_name='Key')),
+                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created')),
+                ('last_seen_at', models.DateTimeField(blank=True, null=True)),
+                ('api_version', models.IntegerField(choices=[(1, '1')])),
+                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='auth_token', to=settings.AUTH_USER_MODEL, verbose_name='User')),
+            ],
+            options={
+                'verbose_name': 'Token',
+                'verbose_name_plural': 'Tokens',
+                'abstract': False,
+            },
+        ),
+    ]