@danielcok17/prisma-db 1.20.18 → 1.20.19
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/package.json
CHANGED
|
@@ -22,13 +22,18 @@ CREATE INDEX "legal_opinion_case_number_decision_date_idx" ON "legal_opinion" ("
|
|
|
22
22
|
CREATE INDEX "legal_opinion_source_idx" ON "legal_opinion" ("source");
|
|
23
23
|
|
|
24
24
|
-- Backfill from existing legal_precedents rows that have a právna veta
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
DO $$
|
|
26
|
+
BEGIN
|
|
27
|
+
IF EXISTS (SELECT FROM information_schema.tables WHERE table_schema = 'public' AND table_name = 'legal_precedents') THEN
|
|
28
|
+
INSERT INTO "legal_opinion" ("case_number", "decision_date", "ecli", "source", "text", "reasoning")
|
|
29
|
+
SELECT
|
|
30
|
+
lp.case_number,
|
|
31
|
+
lp.decision_date,
|
|
32
|
+
lp.ecli,
|
|
33
|
+
'legal_precedents',
|
|
34
|
+
lp.legal_opinion,
|
|
35
|
+
lp.opinion_reasoning
|
|
36
|
+
FROM legal_precedents lp
|
|
37
|
+
WHERE lp.legal_opinion IS NOT NULL AND lp.legal_opinion != '';
|
|
38
|
+
END IF;
|
|
39
|
+
END $$;
|