From 2fb27adbf67c13d89ac652f3652f7a578a3bcb25 Mon Sep 17 00:00:00 2001 From: Jonathan Rohde Date: Mon, 24 Jun 2024 13:54:24 +0200 Subject: [PATCH] feat(sqlalchemy): add missing file --- backend/migrations/util.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 backend/migrations/util.py diff --git a/backend/migrations/util.py b/backend/migrations/util.py new file mode 100644 index 000000000..401bb94d0 --- /dev/null +++ b/backend/migrations/util.py @@ -0,0 +1,9 @@ +from alembic import op +from sqlalchemy import Inspector + + +def get_existing_tables(): + con = op.get_bind() + inspector = Inspector.from_engine(con) + tables = set(inspector.get_table_names()) + return tables