u
This commit is contained in:
@@ -833,7 +833,7 @@ BEGIN
|
||||
role NVARCHAR(20) NOT NULL,
|
||||
message NVARCHAR(MAX) NOT NULL,
|
||||
CONSTRAINT FK_modelmessage_conversation FOREIGN KEY (conversation_id) REFERENCES modelconversation(id) ON DELETE CASCADE,
|
||||
CONSTRAINT CK_modelmessage_role CHECK (role IN ('system', 'user', 'assistant', 'tool', 'reasoning'))
|
||||
CONSTRAINT CK_modelmessage_role CHECK (role IN ('system', 'user', 'assistant', 'tool', 'reasoning', 'usage'))
|
||||
);
|
||||
CREATE INDEX IX_modelmessage_conversation ON modelmessage (conversation_id, id);
|
||||
END
|
||||
|
||||
@@ -518,7 +518,7 @@ CREATE TABLE IF NOT EXISTS modelmessage (
|
||||
id INTEGER PRIMARY KEY,
|
||||
conversation_id INTEGER NOT NULL,
|
||||
created_at TEXT NOT NULL DEFAULT (${UTC_NOW}),
|
||||
role TEXT NOT NULL CHECK (role IN ('system', 'user', 'assistant', 'tool', 'reasoning')),
|
||||
role TEXT NOT NULL CHECK (role IN ('system', 'user', 'assistant', 'tool', 'reasoning', 'usage')),
|
||||
message TEXT NOT NULL,
|
||||
FOREIGN KEY (conversation_id) REFERENCES modelconversation(id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user