platform/server/postgres/migrations/txSchema.sql
Denis Bykhov 430be8c3ba
Some checks failed
CI / build (push) Has been cancelled
CI / uitest (push) Has been cancelled
CI / uitest-pg (push) Has been cancelled
CI / uitest-qms (push) Has been cancelled
CI / svelte-check (push) Has been cancelled
CI / formatting (push) Has been cancelled
CI / test (push) Has been cancelled
CI / docker-build (push) Has been cancelled
CI / dist-build (push) Has been cancelled
Change tx schema (#7179)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
2024-11-15 13:22:32 +07:00

18 lines
314 B
SQL

ALTER TABLE tx
ADD "objectSpace" text,
ADD "objectId" text;
UPDATE tx
SET "objectId" = (data->>'objectId');
UPDATE tx
SET "objectSpace" = (data->>'objectSpace');
ALTER TABLE tx
ALTER COLUMN "objectSpace" SET NOT NULL;
ALTER TABLE tx
ADD "attachedTo" text;
UPDATE tx
SET "attachedTo" = (data->>'attachedTo');