Change tx schema (#7179)
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

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2024-11-15 11:22:32 +05:00 committed by GitHub
parent 123ae25b68
commit 430be8c3ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 5 deletions

View File

@ -2,9 +2,6 @@ ALTER TABLE tx
ADD "objectSpace" text,
ADD "objectId" text;
ALTER TABLE tx
DROP COLUMN "attachedTo";
UPDATE tx
SET "objectId" = (data->>'objectId');
@ -13,3 +10,9 @@ 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');

View File

@ -86,7 +86,7 @@ const spaceSchema: Schema = {
}
const txSchema: Schema = {
...baseSchema,
...defaultSchema,
objectSpace: {
type: 'text',
notNull: true,