Files
probo/pkg/coredata/migrations/20260129T133000Z.sql
2026-02-02 13:32:56 +04:00

21 lines
385 B
SQL

ALTER TABLE
trust_centers
ADD
COLUMN logo_file_id TEXT REFERENCES files(id) ON UPDATE CASCADE ON DELETE
SET
NULL,
ADD
COLUMN dark_logo_file_id TEXT REFERENCES files(id) ON UPDATE CASCADE ON DELETE
SET
NULL;
UPDATE
trust_centers t
SET
logo_file_id = o.logo_file_id
FROM
organizations o
WHERE
t.organization_id = o.id
AND t.logo_file_id IS NULL;