-
Notifications
You must be signed in to change notification settings - Fork 894
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1054 from julep-ai/dev
dev -> main
- Loading branch information
Showing
3 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
memory-store/migrations/000023_update_strings_length_constraints.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
BEGIN; | ||
|
||
-- Drop the updated constraints | ||
ALTER TABLE agents | ||
DROP CONSTRAINT IF EXISTS ct_agents_about_length; | ||
|
||
ALTER TABLE tools | ||
DROP CONSTRAINT IF EXISTS ct_tools_description_length; | ||
|
||
ALTER TABLE files | ||
DROP CONSTRAINT IF EXISTS ct_files_description_length; | ||
|
||
ALTER TABLE tasks | ||
DROP CONSTRAINT IF EXISTS ct_tasks_description_length; | ||
|
||
-- Restore original constraints | ||
ALTER TABLE tools | ||
ADD CONSTRAINT ct_tools_description_length CHECK ( | ||
description IS NULL | ||
OR length(description) <= 1000 | ||
); | ||
|
||
ALTER TABLE files | ||
ADD CONSTRAINT ct_files_description_length CHECK ( | ||
description IS NULL | ||
OR length(description) <= 1000 | ||
); | ||
|
||
ALTER TABLE tasks | ||
ADD CONSTRAINT ct_tasks_description_length CHECK ( | ||
description IS NULL | ||
OR length(description) <= 1000 | ||
); | ||
|
||
ALTER TABLE agents | ||
ADD CONSTRAINT ct_agents_about_length CHECK ( | ||
about IS NULL | ||
OR length(about) <= 5000 | ||
); | ||
|
||
COMMIT; |
41 changes: 41 additions & 0 deletions
41
memory-store/migrations/000023_update_strings_length_constraints.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
BEGIN; | ||
|
||
-- Drop existing constraints | ||
ALTER TABLE agents | ||
DROP CONSTRAINT IF EXISTS ct_agents_about_length; | ||
|
||
ALTER TABLE tools | ||
DROP CONSTRAINT IF EXISTS ct_tools_description_length; | ||
|
||
ALTER TABLE files | ||
DROP CONSTRAINT IF EXISTS ct_files_description_length; | ||
|
||
ALTER TABLE tasks | ||
DROP CONSTRAINT IF EXISTS ct_tasks_description_length; | ||
|
||
-- Add new constraints with updated length | ||
ALTER TABLE agents | ||
ADD CONSTRAINT ct_agents_about_length CHECK ( | ||
about IS NULL | ||
OR length(about) <= 16000 | ||
); | ||
|
||
ALTER TABLE tools | ||
ADD CONSTRAINT ct_tools_description_length CHECK ( | ||
description IS NULL | ||
OR length(description) <= 16000 | ||
); | ||
|
||
ALTER TABLE files | ||
ADD CONSTRAINT ct_files_description_length CHECK ( | ||
description IS NULL | ||
OR length(description) <= 16000 | ||
); | ||
|
||
ALTER TABLE tasks | ||
ADD CONSTRAINT ct_tasks_description_length CHECK ( | ||
description IS NULL | ||
OR length(description) <= 16000 | ||
); | ||
|
||
COMMIT; |