Add logos to trust_centers and auto fill with organization logo
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
20
pkg/coredata/migrations/20260129T133000Z.sql
Normal file
20
pkg/coredata/migrations/20260129T133000Z.sql
Normal file
@@ -0,0 +1,20 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user