Skip to content

Commit

Permalink
[timeseries] DROP timeseries_state PK if it exists (#454)
Browse files Browse the repository at this point in the history
As some previous migration feature might left one, causing rare crashes
where a backfill collide with normal state updates
  • Loading branch information
vguerci authored Sep 2, 2019
1 parent ca60cc2 commit 0c4a2a3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ private[timeseries] object Database {
CREATE INDEX timeseries_backfills_by_status ON timeseries_backfills (status);
""".update.run,
contextIdMigration,
NoUpdate // We removed this migration, so we reserve this slot
NoUpdate, // We removed this migration, so we reserve this slot
sql"DROP INDEX IF EXISTS `PRIMARY` ON timeseries_state".update.run
)

val doSchemaUpdates: ConnectionIO[Unit] = utils.updateSchema("timeseries", schema)
Expand Down

0 comments on commit 0c4a2a3

Please sign in to comment.