-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new migration to add indexes and fields for OCR
- Loading branch information
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
screenpipe-server/src/migrations/20240716120000_add_fields_to_ocr_text.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,13 @@ | ||
-- Add new columns to the ocr_text table | ||
ALTER TABLE ocr_text ADD COLUMN Tesseract_TSV_object TEXT; | ||
ALTER TABLE ocr_text ADD COLUMN unique_text_lines_24hr TEXT; | ||
ALTER TABLE ocr_text ADD COLUMN unique_text_lines_1hr TEXT; | ||
ALTER TABLE ocr_text ADD COLUMN unique_text_lines_1m TEXT; | ||
ALTER TABLE ocr_text ADD COLUMN diff_vs_previous_frame_by_line TEXT; | ||
|
||
-- Create indices for the new columns | ||
CREATE INDEX IF NOT EXISTS idx_ocr_text_Tesseract_TSV_object ON ocr_text(Tesseract_TSV_object); | ||
CREATE INDEX IF NOT EXISTS idx_ocr_text_unique_text_lines_24hr ON ocr_text(unique_text_lines_24hr); | ||
CREATE INDEX IF NOT EXISTS idx_ocr_text_unique_text_lines_1hr ON ocr_text(unique_text_lines_1hr); | ||
CREATE INDEX IF NOT EXISTS idx_ocr_text_unique_text_lines_1m ON ocr_text(unique_text_lines_1m); | ||
CREATE INDEX IF NOT EXISTS idx_ocr_text_diff_vs_previous_frame_by_line ON ocr_text(diff_vs_previous_frame_by_line); |