do not use UUID type for compatibility with old MariaDB servers
This commit is contained in:
parent
daeea9cfd7
commit
f3a27be971
@ -1,6 +1,6 @@
|
||||
import uuid
|
||||
|
||||
from sqlalchemy import Column, Integer, VARCHAR, Text, LargeBinary, ForeignKey, UUID
|
||||
from sqlalchemy import Column, Integer, VARCHAR, Text, LargeBinary, ForeignKey
|
||||
from sqlalchemy.orm import relationship, declarative_base
|
||||
|
||||
Base = declarative_base()
|
||||
@ -200,7 +200,7 @@ class Reaction(Base):
|
||||
IMG = Column(LargeBinary(length=2**24), comment="Binary data of the image associated to this npc and trait")
|
||||
NPC = relationship("Npc")
|
||||
TRAIT = relationship("Trait")
|
||||
REACTION_UUID = Column(UUID, unique=True, comment="ID of this reaction")
|
||||
REACTION_UUID = Column(VARCHAR(255), unique=True, comment="ID of this reaction")
|
||||
|
||||
def __init__(self, REACTION_ID, NPC_ID, TRAIT_ID):
|
||||
self.REACTION_ID = REACTION_ID
|
||||
|
@ -161,7 +161,7 @@ def get_npc_reaction():
|
||||
@routes_api.route("/getReaction", methods=["GET", "POST"])
|
||||
def get_reaction():
|
||||
input_uuid = flask.request.values.get("uuid")
|
||||
results = db.session.execute(select(Reaction).where(Reaction.REACTION_UUID==uuid.UUID(input_uuid)))
|
||||
results = db.session.execute(select(Reaction).where(Reaction.REACTION_UUID==input_uuid))
|
||||
|
||||
row = results.first()
|
||||
if row == None:
|
||||
|
Loading…
Reference in New Issue
Block a user