max / makenotwork
| 1 | -- Move the Tauri updater signature from the release onto the artifact. |
| 2 | -- |
| 3 | -- Tauri's minisign signature is per-FILE: each (target, arch) artifact is signed |
| 4 | -- independently and carries its own signature. ota_releases held a single |
| 5 | -- release-level `signature` (migration 033), so publishing a second platform for |
| 6 | -- one version advertised it with the first platform's signature, and |
| 7 | -- updater_check served that one signature for every target. The Tauri updater |
| 8 | -- then silently refuses the mismatched platform's update forever. mnw-cli's |
| 9 | -- --release-id resume flow (attach a second artifact to an existing release) |
| 10 | -- makes this reachable today. (audit 2026-07-21; wiki [[release-artifact-identity]].) |
| 11 | -- |
| 12 | -- Backfill each artifact from its parent release's signature. For a |
| 13 | -- single-platform release this is exactly correct; for the buggy multi-platform |
| 14 | -- case it preserves the current (wrong-for-the-second-platform) behavior rather |
| 15 | -- than blanking it. Re-publishing the affected artifact writes the right one. |
| 16 | -- ota_releases.signature is left in place (forward-only migrations, live rows) |
| 17 | -- but is no longer read or written; it is dead after this migration. |
| 18 | |
| 19 | ota_artifacts |
| 20 | ADD COLUMN IF NOT EXISTS signature TEXT NOT NULL DEFAULT ''; |
| 21 | |
| 22 | UPDATE ota_artifacts a |
| 23 | SET signature = r.signature |
| 24 | FROM ota_releases r |
| 25 | WHERE a.release_id = r.id |
| 26 | AND a.signature = ''; |
| 27 |