Skip to content

Commit

Permalink
Merge pull request #288 from NTIA/run-migrations
Browse files Browse the repository at this point in the history
Run Django migrations and specify default type for auto-created primary keys
  • Loading branch information
dboulware authored Jun 11, 2024
2 parents 510034f + 6294821 commit 3d78f39
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sensor/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,3 +457,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",
),
),
]

0 comments on commit 3d78f39

Please sign in to comment.