update
This commit is contained in:
@@ -21,21 +21,6 @@ def main() -> int:
|
||||
app.config.from_object(Config)
|
||||
db.init_app(app)
|
||||
|
||||
with app.app_context():
|
||||
users = User.query.all()
|
||||
updated_count = 0
|
||||
|
||||
for user in users:
|
||||
if user.password and not is_hashed(user.password):
|
||||
print(f"🔄 변환 대상: {user.username}")
|
||||
user.password = generate_password_hash(user.password)
|
||||
updated_count += 1
|
||||
|
||||
if updated_count:
|
||||
db.session.commit()
|
||||
print(f"✅ 완료: {updated_count}명 해시 처리")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user