From 23dc6962d81c553d72a6ac11ed46ceaa2f9cac42 Mon Sep 17 00:00:00 2001 From: Thomas Rubini <74205383+ThomasRubini@users.noreply.github.com> Date: Sun, 19 Mar 2023 10:43:18 +0100 Subject: [PATCH] add npc reaction images to database --- truthinquiry/ext/database/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/truthinquiry/ext/database/models.py b/truthinquiry/ext/database/models.py index dabfc81..9c9db4c 100644 --- a/truthinquiry/ext/database/models.py +++ b/truthinquiry/ext/database/models.py @@ -1,4 +1,4 @@ -from sqlalchemy import Column, Integer, VARCHAR, Text, ForeignKey +from sqlalchemy import Column, Integer, VARCHAR, Text, LargeBinary, ForeignKey from sqlalchemy.orm import relationship, declarative_base Base = declarative_base() @@ -173,6 +173,7 @@ class Reaction(Base): REACTION_ID = Column(Integer, primary_key=True, autoincrement=True, comment="ID of this reaction") NPC_ID = Column(Integer, ForeignKey("T_NPC.NPC_ID"), primary_key=True, comment="Name of the NPC that will have this reaction") TRAIT_ID = Column(Integer, ForeignKey("T_TRAIT.TRAIT_ID"), primary_key=True, comment="ID of the trait of this reaction") + IMG = Column(LargeBinary(length=2**24), comment="Binary data of the image associated to this npc and trait") NPC = relationship("Npc") TRAIT = relationship("Trait")