database/sqlite: add migration for WebPushSubscription.user

This should be enough to fixup the user column for subscriptions
with a network specified.
This commit is contained in:
Simon Ser 2022-06-16 19:46:59 +02:00
parent f0db261fc0
commit 27b8547572

View file

@ -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);
`,
}