hisham-cmd commited on
Commit
8b3a157
·
verified ·
1 Parent(s): 90de406

Delete set_admin.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. set_admin.py +0 -28
set_admin.py DELETED
@@ -1,28 +0,0 @@
1
- import sqlite3
2
- import os
3
-
4
- # Database path
5
- DB_PATH = os.path.join(os.path.dirname(__file__), "vortex.db")
6
-
7
- def set_all_admins():
8
- if not os.path.exists(DB_PATH):
9
- print(f"Error: Database not found at {DB_PATH}")
10
- return
11
-
12
- try:
13
- conn = sqlite3.connect(DB_PATH)
14
- cursor = conn.cursor()
15
-
16
- # Update all users to admin role for development
17
- cursor.execute("UPDATE users SET role = 'admin'")
18
- conn.commit()
19
-
20
- updated_count = cursor.rowcount
21
- print(f"Successfully updated {updated_count} users to ADMIN role.")
22
-
23
- conn.close()
24
- except Exception as e:
25
- print(f"An error occurred: {e}")
26
-
27
- if __name__ == "__main__":
28
- set_all_admins()