File tree 3 files changed +27
-4
lines changed
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
+
1
5
## 0.1.11
2
6
3
7
- Add ` headers ` to SDKOperationRequest
Original file line number Diff line number Diff line change 1
1
__title__ = "aidbox-python-sdk"
2
- __version__ = "0.1.11 "
2
+ __version__ = "0.1.12 "
3
3
__author__ = "beda.software"
4
4
__license__ = "None"
5
5
__copyright__ = "Copyright 2024 beda.software"
Original file line number Diff line number Diff line change 13
13
END LOOP;
14
14
END;
15
15
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
+ },
19
38
]
You can’t perform that action at this time.
0 commit comments