Skip to content

Commit cc2d8d8

Browse files
authored
Merge pull request #87 from zakharych/use-regex-in-drop-before-all-migration
Update drop_before_all db migration
2 parents 4d141dc + d79a95a commit cc2d8d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aidbox_python_sdk/db_migrations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
FOR e IN (
2828
SELECT table_name
2929
FROM information_schema.columns
30-
WHERE column_name = 'txid' AND table_schema = 'public' AND table_name NOT LIKE '%\\_history' ESCAPE '\\'
30+
WHERE column_name = 'txid' AND table_schema = 'public' AND table_name !~ '_history$'
3131
) LOOP
3232
EXECUTE 'DELETE FROM "' || e.table_name || '" WHERE txid > ' || $1 ;
3333
END LOOP;

0 commit comments

Comments
 (0)