@crewx/sdk 0.9.0-rc.70 → 0.9.0-rc.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +59 -59
- package/dist/esm/repository/index.js +21 -21
- package/dist/index.js +61 -61
- package/dist/migrations/0017_project_stage_sdk_migration.sql +29 -0
- package/dist/migrations/meta/0017_snapshot.json +2419 -0
- package/dist/migrations/meta/_journal.json +8 -1
- package/dist/repository/index.d.ts +1 -1
- package/dist/repository/index.js +24 -24
- package/dist/repository/project.repository.d.ts +4 -2
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
-- Normalize the exact historical default without carrying translated labels
|
|
2
|
+
-- into the SDK-owned persistence contract.
|
|
3
|
+
UPDATE projects
|
|
4
|
+
SET stages_json = '[{"key":"outcome_plan","labelOverride":null},{"key":"contract_check","labelOverride":null},{"key":"feature_link","labelOverride":null},{"key":"use_verify","labelOverride":null},{"key":"result_review","labelOverride":null}]'
|
|
5
|
+
WHERE json(stages_json) = json('[{"key":"outcome_plan","label":"결과·계획"},{"key":"contract_check","label":"계약 확인"},{"key":"feature_link","label":"기능 연결"},{"key":"use_verify","label":"사용 검증"},{"key":"result_review","label":"결과 확인"}]');
|
|
6
|
+
--> statement-breakpoint
|
|
7
|
+
-- Custom and mixed arrays retain their label text under the new property name.
|
|
8
|
+
UPDATE projects
|
|
9
|
+
SET stages_json = (
|
|
10
|
+
SELECT json_group_array(
|
|
11
|
+
CASE
|
|
12
|
+
WHEN json_type(value, '$.label') IS NULL THEN json(value)
|
|
13
|
+
ELSE json_set(
|
|
14
|
+
json_remove(json(value), '$.label'),
|
|
15
|
+
'$.labelOverride',
|
|
16
|
+
json(json_quote(json_extract(value, '$.label')))
|
|
17
|
+
)
|
|
18
|
+
END
|
|
19
|
+
)
|
|
20
|
+
FROM json_each(projects.stages_json)
|
|
21
|
+
)
|
|
22
|
+
WHERE json_valid(stages_json)
|
|
23
|
+
AND json_type(stages_json) = 'array'
|
|
24
|
+
AND json(stages_json) <> json('[{"key":"outcome_plan","label":"결과·계획"},{"key":"contract_check","label":"계약 확인"},{"key":"feature_link","label":"기능 연결"},{"key":"use_verify","label":"사용 검증"},{"key":"result_review","label":"결과 확인"}]')
|
|
25
|
+
AND EXISTS (
|
|
26
|
+
SELECT 1
|
|
27
|
+
FROM json_each(projects.stages_json)
|
|
28
|
+
WHERE json_type(value, '$.label') IS NOT NULL
|
|
29
|
+
);
|