task-p.5.1
This commit is contained in:
11
drizzle/0006_lazy_shiver_man.sql
Normal file
11
drizzle/0006_lazy_shiver_man.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
ALTER TABLE "crm_document_template_versions" ADD COLUMN "metadata_json" jsonb;
|
||||
--> statement-breakpoint
|
||||
UPDATE "crm_document_template_versions"
|
||||
SET
|
||||
"metadata_json" = COALESCE("metadata_json", "schema_json" -> '__templateManagement'),
|
||||
"schema_json" = CASE
|
||||
WHEN "schema_json" ? '__templateManagement'
|
||||
THEN "schema_json" - '__templateManagement'
|
||||
ELSE "schema_json"
|
||||
END
|
||||
WHERE "schema_json" ? '__templateManagement';
|
||||
Reference in New Issue
Block a user