We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3415f47 + b420a24 commit 21ed522Copy full SHA for 21ed522
1 file changed
app/api/prospects/database/reset_hide.py
@@ -0,0 +1,20 @@
1
+# Script to reset all 'hide' values to false in the prospects table
2
+from app.utils.db import get_db_connection
3
+
4
+def reset_hide():
5
+ conn_gen = get_db_connection()
6
+ conn = next(conn_gen)
7
+ cur = conn.cursor()
8
+ try:
9
+ cur.execute("UPDATE prospects SET hide = FALSE;")
10
+ conn.commit()
11
+ print("All 'hide' values reset to FALSE.")
12
+ except Exception as e:
13
+ print(f"Error: {e}")
14
+ conn.rollback()
15
+ finally:
16
+ cur.close()
17
+ conn.close()
18
19
+if __name__ == "__main__":
20
+ reset_hide()
0 commit comments