fix: correct table name in Game model to 'games' to resolve OperationalError

This commit is contained in:
Manuel Weiser 2024-09-02 09:42:47 +02:00
parent 30933ed2d5
commit 8345ac4e64

View File

@ -3,6 +3,7 @@ from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy() db = SQLAlchemy()
class Game(db.Model): class Game(db.Model):
__tablename__ = 'games' # Ensure the table name is set to 'games'
id = db.Column(db.Integer, primary_key=True) id = db.Column(db.Integer, primary_key=True)
image = db.Column(db.String(255)) image = db.Column(db.String(255))
title = db.Column(db.String(100), nullable=False) title = db.Column(db.String(100), nullable=False)