From 27b85475726473137400f0083f8a651ebce49391 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 16 Jun 2022 19:46:59 +0200 Subject: [PATCH] database/sqlite: add migration for WebPushSubscription.user This should be enough to fixup the user column for subscriptions with a network specified. --- database/sqlite.go | 1 + 1 file changed, 1 insertion(+) diff --git a/database/sqlite.go b/database/sqlite.go index 21ae8f1..dbf45d2 100644 --- a/database/sqlite.go +++ b/database/sqlite.go @@ -241,6 +241,7 @@ var sqliteMigrations = []string{ `, ` ALTER TABLE WebPushSubscription ADD COLUMN user INTEGER REFERENCES User(id); + UPDATE WebPushSubscription AS wps SET user = (SELECT n.user FROM Network AS n WHERE n.id = wps.network); `, }