Some modernizations.
[redakcja.git] / src / team / migrations / 0001_initial.py
1 # Generated by Django 4.0.6 on 2023-05-22 13:06
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         ('documents', '0008_book_legimi_id'),
14         migrations.swappable_dependency(settings.AUTH_USER_MODEL),
15     ]
16
17     operations = [
18         migrations.CreateModel(
19             name='Profile',
20             fields=[
21                 ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
22                 ('presence', models.BooleanField()),
23                 ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
24             ],
25         ),
26         migrations.CreateModel(
27             name='Presence',
28             fields=[
29                 ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
30                 ('timestamp', models.DateTimeField(auto_now_add=True, db_index=True)),
31                 ('active', models.BooleanField()),
32                 ('chunk', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='documents.chunk')),
33                 ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
34             ],
35         ),
36     ]