Skip to content

Commit

Permalink
new migration to add indexes and fields for OCR
Browse files Browse the repository at this point in the history
  • Loading branch information
m13v committed Jul 16, 2024
1 parent 015a38c commit af068dc
Showing 1 changed file with 13 additions and 0 deletions.
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);

0 comments on commit af068dc

Please sign in to comment.