Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit 38511a9

Browse files
committed
build: include migrating timeseries
we previously did not include timeseries in INSTALLED_APPS and we did not include it in the migrate-timeseries.sh script but there's no good reason for that, and we should try to migrate all apps and databases if we can i think monorepo fixes this in some way but for now we should do this and when we move over to the monorepo we should take a second look at all these different scripts and try to consolidate the logic
1 parent 22d1b65 commit 38511a9

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

django_scaffold/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"shared.django_apps.reports",
3737
"shared.django_apps.staticanalysis",
3838
"shared.django_apps.ta_timeseries",
39+
"shared.django_apps.timeseries",
3940
]
4041

4142
TELEMETRY_VANILLA_DB = "default"

migrate_timeseries.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,22 @@
1515

1616
def run_migrate_commands():
1717
try:
18+
if settings.TIMESERIES_ENABLED:
19+
logger.info("Running timeseries migrations")
20+
21+
call_command(
22+
"migrate",
23+
database="timeseries",
24+
app_label="timeseries",
25+
settings="django_scaffold.settings",
26+
verbosity=1,
27+
)
28+
else:
29+
logger.info("Skipping timeseries migrations")
30+
1831
if settings.TA_TIMESERIES_ENABLED:
1932
logger.info("Running ta_timeseries migrations")
33+
2034
call_command(
2135
"migrate",
2236
database="ta_timeseries",

0 commit comments

Comments
 (0)