Initial commit - Church Music Database
This commit is contained in:
26
legacy-site/backend/update_hop_password.py
Normal file
26
legacy-site/backend/update_hop_password.py
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Quick script to update existing user password to bcrypt
|
||||
"""
|
||||
import sys
|
||||
import os
|
||||
sys.path.insert(0, os.path.dirname(__file__))
|
||||
|
||||
from postgresql_models import SessionLocal, User
|
||||
|
||||
db = SessionLocal()
|
||||
try:
|
||||
user = db.query(User).filter(User.username == 'hop').first()
|
||||
if user:
|
||||
user.set_password('hop@2026ilovejesus')
|
||||
db.commit()
|
||||
print(f"✓ Updated password for user 'hop' to bcrypt")
|
||||
else:
|
||||
print("User 'hop' not found")
|
||||
sys.exit(1)
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
db.rollback()
|
||||
sys.exit(1)
|
||||
finally:
|
||||
db.close()
|
||||
Reference in New Issue
Block a user