From da2b9643f03a4d1a5f8b27da29460f3bad04bed4 Mon Sep 17 00:00:00 2001 From: Wei Zang Date: Wed, 8 Apr 2026 19:04:25 +0100 Subject: [PATCH 1/2] Bump package version to 2.1.8 Update __version__ in app/__init__.py from 2.1.7 to 2.1.8 to reflect the new release. --- app/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/__init__.py b/app/__init__.py index 08a9ea4..7dd6553 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -1,4 +1,4 @@ """Python - FastAPI, Postgres, tsvector""" # Current Version -__version__ = "2.1.7" +__version__ = "2.1.8" From 05e6e5b25c7abc431c6133c8f21c8d03bb92262b Mon Sep 17 00:00:00 2001 From: Wei Zang Date: Wed, 8 Apr 2026 19:37:10 +0100 Subject: [PATCH 2/2] Add script to reset prospects flag and hide Introduce a standalone maintenance script at app/api/prospects/sql/reset_flag_hide.py that runs a SQL UPDATE to set prospects.flag and prospects.hide to FALSE for all rows. The script obtains a direct DB connection via get_db_connection_direct(), executes the update, commits, and prints a confirmation. Useful for resetting prospect visibility states during maintenance or migrations. --- app/api/prospects/sql/reset_flag_hide.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 app/api/prospects/sql/reset_flag_hide.py diff --git a/app/api/prospects/sql/reset_flag_hide.py b/app/api/prospects/sql/reset_flag_hide.py new file mode 100644 index 0000000..ef58c49 --- /dev/null +++ b/app/api/prospects/sql/reset_flag_hide.py @@ -0,0 +1,17 @@ +import os +import sys +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../..'))) +from app.utils.db import get_db_connection_direct + +if __name__ == "__main__": + sql = """ + UPDATE prospects + SET flag = FALSE, hide = FALSE; + """ + conn = get_db_connection_direct() + cur = conn.cursor() + cur.execute(sql) + conn.commit() + cur.close() + conn.close() + print("All prospects' flag and hide columns have been reset to FALSE.")