updated to get card name

This commit is contained in:
DigiServer Developer
2025-12-13 21:51:45 +02:00
parent 0dfeb0ef7f
commit 87709bab4d
12 changed files with 347 additions and 33 deletions

View File

@@ -0,0 +1,24 @@
"""Migrate player_user table to remove player_id and make user_code unique globally."""
import sys
sys.path.insert(0, '/app')
from app.app import create_app
from app.extensions import db
from sqlalchemy import text
app = create_app('production')
with app.app_context():
print("Migrating player_user table...")
# Drop existing table and recreate with new schema
db.session.execute(text('DROP TABLE IF EXISTS player_user'))
db.session.commit()
# Create new table
db.create_all()
print("✓ player_user table migrated successfully!")
print(" - Removed player_id foreign key")
print(" - Made user_code unique globally")
print(" - user_name is now nullable")