first commit

This commit is contained in:
2026-01-09 19:14:41 +08:00
commit 9f3c96ce73
67 changed files with 9636 additions and 0 deletions

17
backend/drop_tables.py Normal file
View File

@@ -0,0 +1,17 @@
from sqlalchemy import create_engine, text
from app.config import DATABASE_URL, TABLE_PREFIX
def drop_user_table():
engine = create_engine(DATABASE_URL)
table_name = f"{TABLE_PREFIX}Users"
lower_table_name = f"{TABLE_PREFIX}users"
with engine.connect() as conn:
# Try dropping both case variants to be sure
conn.execute(text(f"DROP TABLE IF EXISTS {table_name}"))
conn.execute(text(f"DROP TABLE IF EXISTS {lower_table_name}"))
conn.commit()
print(f"Dropped table {table_name} (and lowercase variant if existed).")
if __name__ == "__main__":
drop_user_table()