uso fixo de json e troca do banco para postgresql
This commit is contained in:
Binary file not shown.
@@ -1,4 +1,5 @@
|
||||
from sqlalchemy import Column, String, Boolean, JSON
|
||||
from sqlalchemy import Column, String, Boolean
|
||||
from sqlalchemy.dialects.postgresql import JSONB
|
||||
from app.db.database import Base
|
||||
import uuid
|
||||
|
||||
@@ -12,9 +13,8 @@ class Game(Base):
|
||||
developer = Column(String)
|
||||
active = Column(Boolean, default=True)
|
||||
|
||||
# Usando JSON para simplificar arrays no MVP conforme os requisitos.
|
||||
# Em um banco relacional robusto, genres e platforms seriam tabelas M:N.
|
||||
genres = Column(JSON)
|
||||
platforms = Column(JSON)
|
||||
images = Column(JSON)
|
||||
system_requirements = Column(JSON)
|
||||
# Usando JSONB para melhor performance e suporte a buscas nativas no PostgreSQL
|
||||
genres = Column(JSONB)
|
||||
platforms = Column(JSONB)
|
||||
images = Column(JSONB)
|
||||
system_requirements = Column(JSONB)
|
||||
|
||||
Reference in New Issue
Block a user