Coverage for django_napse/core/migrations/0002_history_historydatapoint_historydatapointfield.py: 100%
6 statements
« prev ^ index » next coverage.py v7.4.3, created at 2024-03-12 13:49 +0000
« prev ^ index » next coverage.py v7.4.3, created at 2024-03-12 13:49 +0000
1# Generated by Django 4.2.5 on 2023-10-05 15:54
3from django.db import migrations, models
4import django.db.models.deletion
5import uuid
8class Migration(migrations.Migration):
10 dependencies = [
11 ("django_napse_core", "0001_initial"),
12 ]
14 operations = [
15 migrations.CreateModel(
16 name="History",
17 fields=[
18 (
19 "id",
20 models.BigAutoField(
21 auto_created=True,
22 primary_key=True,
23 serialize=False,
24 verbose_name="ID",
25 ),
26 ),
27 (
28 "uuid",
29 models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
30 ),
31 ],
32 ),
33 migrations.CreateModel(
34 name="HistoryDataPoint",
35 fields=[
36 (
37 "id",
38 models.BigAutoField(
39 auto_created=True,
40 primary_key=True,
41 serialize=False,
42 verbose_name="ID",
43 ),
44 ),
45 (
46 "history",
47 models.ForeignKey(
48 on_delete=django.db.models.deletion.CASCADE,
49 related_name="data_points",
50 to="django_napse_core.history",
51 ),
52 ),
53 ],
54 ),
55 migrations.CreateModel(
56 name="HistoryDataPointField",
57 fields=[
58 (
59 "id",
60 models.BigAutoField(
61 auto_created=True,
62 primary_key=True,
63 serialize=False,
64 verbose_name="ID",
65 ),
66 ),
67 ("key", models.CharField(max_length=255)),
68 ("value", models.CharField(max_length=255)),
69 ("target_type", models.CharField(max_length=255)),
70 (
71 "history_data_point",
72 models.ForeignKey(
73 on_delete=django.db.models.deletion.CASCADE,
74 related_name="fields",
75 to="django_napse_core.historydatapoint",
76 ),
77 ),
78 ],
79 ),
80 ]