Files
huly-platform/foundations/server/packages/postgres/migrations/dncSchema.sql
T
Denis Bykhov 2b0d510202 Add 'foundations/server/' from commit 'afe85b988c56330dd14d44fb766e2c41871b64a7'
git-subtree-dir: foundations/server
git-subtree-mainline: fd0b7130eb
git-subtree-split: afe85b988c
2025-11-26 22:56:52 +05:00

25 lines
537 B
SQL

ALTER TABLE notification_dnc
ADD "objectId" text,
ADD "objectClass" text,
ADD "user" text;
ALTER TABLE notification_dnc
DROP COLUMN "attachedTo";
UPDATE notification_dnc
SET "objectId" = (data->>'objectId');
UPDATE notification_dnc
SET "objectClass" = (data->>'objectClass');
UPDATE notification_dnc
SET "user" = (data->>'user');
ALTER TABLE notification_dnc
ALTER COLUMN "objectId" SET NOT NULL;
ALTER TABLE notification_dnc
ALTER COLUMN "objectClass" SET NOT NULL;
ALTER TABLE notification_dnc
ALTER COLUMN "user" SET NOT NULL;