Publishing tags.
[redakcja.git] / src / redakcja / api / migrations / 0001_initial.py
1 # Generated by Django 3.1.13 on 2021-09-10 15:04
2
3 from django.conf import settings
4 from django.db import migrations, models
5 import django.db.models.deletion
6
7
8 class Migration(migrations.Migration):
9
10     initial = True
11
12     dependencies = [
13         migrations.swappable_dependency(settings.AUTH_USER_MODEL),
14     ]
15
16     operations = [
17         migrations.CreateModel(
18             name='Token',
19             fields=[
20                 ('key', models.CharField(max_length=40, primary_key=True, serialize=False, verbose_name='Key')),
21                 ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created')),
22                 ('last_seen_at', models.DateTimeField(blank=True, null=True)),
23                 ('api_version', models.IntegerField(choices=[(1, '1')])),
24                 ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='auth_token', to=settings.AUTH_USER_MODEL, verbose_name='User')),
25             ],
26             options={
27                 'verbose_name': 'Token',
28                 'verbose_name_plural': 'Tokens',
29                 'abstract': False,
30             },
31         ),
32     ]