File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -209,8 +209,18 @@ def get_dbos_migration_two(schema: str) -> str:
209209"""
210210
211211
212+ def get_dbos_migration_three (schema : str ) -> str :
213+ return f"""
214+ create index "idx_workflow_status_queue_status_started" on \" { schema } \" ."workflow_status" ("queue_name", "status", "started_at_epoch_ms")
215+ """
216+
217+
212218def get_dbos_migrations (schema : str ) -> list [str ]:
213- return [get_dbos_migration_one (schema ), get_dbos_migration_two (schema )]
219+ return [
220+ get_dbos_migration_one (schema ),
221+ get_dbos_migration_two (schema ),
222+ get_dbos_migration_three (schema ),
223+ ]
214224
215225
216226def get_sqlite_timestamp_expr () -> str :
@@ -303,4 +313,9 @@ def get_sqlite_timestamp_expr() -> str:
303313ALTER TABLE workflow_status ADD COLUMN queue_partition_key TEXT;
304314"""
305315
306- sqlite_migrations = [sqlite_migration_one , sqlite_migration_two ]
316+ sqlite_migration_three = """
317+ CREATE INDEX "idx_workflow_status_queue_status_started"
318+ ON "workflow_status" ("queue_name", "status", "started_at_epoch_ms")
319+ """
320+
321+ sqlite_migrations = [sqlite_migration_one , sqlite_migration_two , sqlite_migration_three ]
You can’t perform that action at this time.
0 commit comments