-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Because file catalog need to show file size, tokens #, and chunks #. This commit add those info in file list api
- Loading branch information
Showing
10 changed files
with
946 additions
and
11 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
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
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
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
9 changes: 9 additions & 0 deletions
9
pkg/db/migration/000010_add_file_size__in_kb_file_table.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,9 @@ | ||
BEGIN; | ||
|
||
-- Drop the index (if it was created in the up migration) | ||
DROP INDEX IF EXISTS idx_knowledge_base_file_size; | ||
|
||
-- Remove the column | ||
ALTER TABLE knowledge_base_file DROP COLUMN IF EXISTS size; | ||
|
||
COMMIT; |
10 changes: 10 additions & 0 deletions
10
pkg/db/migration/000010_add_file_size__in_kb_file_table.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,10 @@ | ||
BEGIN; | ||
|
||
-- Add the new column 'size' | ||
ALTER TABLE knowledge_base_file ADD COLUMN size BIGINT; | ||
|
||
-- Add a comment for the new column | ||
COMMENT ON COLUMN knowledge_base_file.size IS 'Size of the file in bytes'; | ||
|
||
|
||
COMMIT; |
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
Oops, something went wrong.