bkyerv
bkyerv
Explore posts from servers
DTDrizzle Team
Created by bkyerv on 8/27/2023 in #help
Strugling to use composite key in schema
How do I represent composite primary key in drizzle way (sqlite) below migration query? I red the docs but failed miserable in trying to implement it.
CREATE TABLE QuestionSetMapping (
SetID INTEGER,
QuestionID INTEGER,
PRIMARY KEY(SetID, QuestionID),
FOREIGN KEY(SetID) REFERENCES QuestionSets(SetID),
FOREIGN KEY(QuestionID) REFERENCES Questions(QuestionID)
);
CREATE TABLE QuestionSetMapping (
SetID INTEGER,
QuestionID INTEGER,
PRIMARY KEY(SetID, QuestionID),
FOREIGN KEY(SetID) REFERENCES QuestionSets(SetID),
FOREIGN KEY(QuestionID) REFERENCES Questions(QuestionID)
);
5 replies
DTDrizzle Team
Created by bkyerv on 8/4/2023 in #help
Discrepancies Between Raw SQL Queries and ORM Operations: Why Might They Behave Differently?
1 replies