File tree Expand file tree Collapse file tree 3 files changed +27
-4
lines changed
Expand file tree Collapse file tree 3 files changed +27
-4
lines changed Original file line number Diff line number Diff line change 1+ ## 0.1.12
2+
3+ - Update drop_before_all to support fhir-schema and old approach #68
4+
15## 0.1.11
26
37- Add ` headers ` to SDKOperationRequest
Original file line number Diff line number Diff line change 11__title__ = "aidbox-python-sdk"
2- __version__ = "0.1.11 "
2+ __version__ = "0.1.12 "
33__author__ = "beda.software"
44__license__ = "None"
55__copyright__ = "Copyright 2024 beda.software"
Original file line number Diff line number Diff line change 1313END LOOP;
1414END;
1515
16- $$ LANGUAGE plpgsql;
17- """ ,
18- }
16+ $$ LANGUAGE plpgsql;""" ,
17+ },
18+ {
19+ "id" : "20240913_change_drop_before_all" ,
20+ "sql" : """
21+ DROP FUNCTION IF EXISTS drop_before_all(integer);
22+
23+ CREATE FUNCTION drop_before_all(integer) RETURNS VOID AS $$
24+ declare
25+ e record;
26+ BEGIN
27+ FOR e IN (
28+ SELECT table_name
29+ FROM information_schema.columns
30+ WHERE column_name = 'txid' AND table_schema = 'public' AND table_name NOT LIKE '%_history'
31+ ) LOOP
32+ EXECUTE 'DELETE FROM "' || e.table_name || '" WHERE txid > ' || $1 ;
33+ END LOOP;
34+ END;
35+
36+ $$ LANGUAGE plpgsql;""" ,
37+ },
1938]
You can’t perform that action at this time.
0 commit comments