Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Django migrations and specify default type for auto-created primary keys #288

Merged
merged 2 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/sensor/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,3 +453,6 @@
USB_DEVICE = env("USB_DEVICE", default=None)
STARTUP_CALIBRATION_ACTION = env("STARTUP_CALIBRATION_ACTION", default=None)
RAY_INIT = env.bool("RAY_INIT", default=False)

# Set default field type for Django auto-created primary keys
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
31 changes: 31 additions & 0 deletions src/status/migrations/0004_auto_20240510_1334.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Generated by Django 3.2.25 on 2024-05-10 13:34

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("status", "0003_auto_20211217_2229"),
]

operations = [
migrations.AlterField(
model_name="location",
name="latitude",
field=models.DecimalField(
decimal_places=6,
help_text="Latitude of the sensor in decimal degrees (WGS84).",
max_digits=9,
),
),
migrations.AlterField(
model_name="location",
name="longitude",
field=models.DecimalField(
decimal_places=6,
help_text="Longitude of the sensor in decimal degrees (WGS84).",
max_digits=9,
),
),
]
23 changes: 23 additions & 0 deletions src/tasks/migrations/0006_alter_taskresult_duration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 3.2.25 on 2024-05-10 13:34

import datetime

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("tasks", "0005_acquisition_data_encrypted"),
]

operations = [
migrations.AlterField(
model_name="taskresult",
name="duration",
field=models.DurationField(
default=datetime.timedelta(0),
help_text="Task duration, in %H:%M:%S.%f format",
),
),
]
Loading