ajout des disponibilités de joueurs et ajouts d'un tableau qui montre les dispo des joueurs lors de la création d'un match
This commit is contained in:
@@ -32,11 +32,11 @@ def create_app():
|
||||
|
||||
with app.app_context():
|
||||
import models
|
||||
from models import User
|
||||
from models import User, MatchParticipant
|
||||
try:
|
||||
# Check if the database schema is up to date by testing a query
|
||||
# that uses all model columns
|
||||
db.session.execute(text('SELECT games FROM users LIMIT 1'))
|
||||
# that uses all model columns including team_side for match participants
|
||||
db.session.execute(text('SELECT games, team_side FROM match_participants LIMIT 1'))
|
||||
db.create_all()
|
||||
except Exception:
|
||||
# If there's a schema mismatch, drop and recreate all tables
|
||||
|
||||
Reference in New Issue
Block a user