mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 04:36:59 +01:00
The gate greps the whole migration file. A comment that said do-not-drop still matched and aborted ship.
10 lines
492 B
SQL
10 lines
492 B
SQL
-- Migration: add site_feedback.screenshots (jsonb array).
|
|
-- Keep the legacy screenshot text column. New writers use screenshots only.
|
|
-- Copy any existing single image into the array when the array is empty.
|
|
|
|
ALTER TABLE "site_feedback" ADD COLUMN IF NOT EXISTS "screenshots" jsonb;
|
|
|
|
UPDATE "site_feedback"
|
|
SET "screenshots" = jsonb_build_array("screenshot"::text)
|
|
WHERE "screenshot" IS NOT NULL
|
|
AND ("screenshots" IS NULL OR "screenshots" = 'null'::jsonb OR "screenshots" = '[]'::jsonb); |