u
This commit is contained in:
@@ -819,10 +819,12 @@ BEGIN
|
||||
created_at DATETIME2 NOT NULL CONSTRAINT DF_modelconversation_created_at DEFAULT SYSUTCDATETIME(),
|
||||
updated_at DATETIME2 NOT NULL CONSTRAINT DF_modelconversation_updated_at DEFAULT SYSUTCDATETIME(),
|
||||
state NVARCHAR(20) NOT NULL CONSTRAINT DF_modelconversation_state DEFAULT 'idle',
|
||||
started_by INT NULL, -- id of the conversation that started this one as a subagent; deliberately NOT a foreign key
|
||||
CONSTRAINT FK_modelconversation_companyuser FOREIGN KEY (companyuser_id) REFERENCES companyuser(id) ON DELETE CASCADE,
|
||||
CONSTRAINT CK_modelconversation_state CHECK (state IN ('idle', 'busy'))
|
||||
);
|
||||
CREATE INDEX IX_modelconversation_companyuser ON modelconversation (companyuser_id, updated_at);
|
||||
CREATE INDEX IX_modelconversation_started_by ON modelconversation (started_by);
|
||||
END
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user