2024-11-18 05:42:36 +00:00
|
|
|
# Generated by Django 5.0.6 on 2024-11-18 05:40
|
2024-05-17 11:27:49 +00:00
|
|
|
|
|
|
|
import django.contrib.gis.db.models.fields
|
|
|
|
import django.db.models.deletion
|
|
|
|
import uuid
|
2024-11-18 05:42:36 +00:00
|
|
|
from django.conf import settings
|
|
|
|
from django.db import migrations, models
|
2024-05-17 11:27:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
initial = True
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
2024-11-18 05:42:36 +00:00
|
|
|
name="GPSTrack",
|
2024-05-17 11:27:49 +00:00
|
|
|
fields=[
|
2024-11-18 05:42:36 +00:00
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.UUIDField(
|
|
|
|
default=uuid.uuid4, primary_key=True, serialize=False
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"user",
|
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
|
|
to=settings.AUTH_USER_MODEL,
|
|
|
|
),
|
|
|
|
),
|
2024-05-17 11:27:49 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2024-11-18 05:42:36 +00:00
|
|
|
name="GPSToken",
|
2024-05-17 11:27:49 +00:00
|
|
|
fields=[
|
2024-11-18 05:42:36 +00:00
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.BigAutoField(
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
verbose_name="ID",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
("name", models.CharField(blank=True, max_length=128, null=True)),
|
|
|
|
("token", models.UUIDField(default=uuid.uuid4)),
|
|
|
|
("read", models.BooleanField(default=False)),
|
|
|
|
("write", models.BooleanField(default=False)),
|
|
|
|
("history", models.BooleanField(default=False)),
|
|
|
|
(
|
|
|
|
"track",
|
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
|
|
to="gpslog.gpstrack",
|
|
|
|
),
|
|
|
|
),
|
2024-05-17 11:27:49 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2024-11-18 05:42:36 +00:00
|
|
|
name="GPSPoint",
|
2024-05-17 11:27:49 +00:00
|
|
|
fields=[
|
2024-11-18 05:42:36 +00:00
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.BigAutoField(
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
verbose_name="ID",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
("point", django.contrib.gis.db.models.fields.PointField(srid=4326)),
|
|
|
|
("timestamp", models.DateTimeField()),
|
|
|
|
("battery", models.FloatField(blank=True, null=True)),
|
|
|
|
("accuracy", models.FloatField(blank=True, null=True)),
|
|
|
|
("speed", models.FloatField(blank=True, null=True)),
|
|
|
|
("bearing", models.FloatField(blank=True, null=True)),
|
|
|
|
("satellites", models.IntegerField(blank=True, null=True)),
|
|
|
|
("user_agent", models.TextField(blank=True, null=True)),
|
|
|
|
(
|
|
|
|
"token",
|
|
|
|
models.ForeignKey(
|
|
|
|
null=True,
|
|
|
|
on_delete=django.db.models.deletion.SET_NULL,
|
|
|
|
to="gpslog.gpstoken",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"track",
|
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
|
|
to="gpslog.gpstrack",
|
|
|
|
),
|
|
|
|
),
|
2024-05-17 11:27:49 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
]
|