omnivore/packages/db/migrations/0123.undo.update_highlight.sql

27 lines
748 B
MySQL
Raw Permalink Normal View History

2023-08-24 03:35:35 +00:00
-- Type: UNDO
-- Name: update_highlight
-- Description: Add fields to highlight table
BEGIN;
DROP TRIGGER IF EXISTS library_item_highlight_annotations_update ON omnivore.highlight;
DROP FUNCTION IF EXISTS update_library_item_highlight_annotations();
2023-09-04 05:06:51 +00:00
DROP POLICY delete_highlight on omnivore.highlight;
REVOKE DELETE ON omnivore.highlight FROM omnivore_user;
2023-08-24 03:35:35 +00:00
ALTER TABLE omnivore.highlight
2023-09-18 14:52:54 +00:00
ADD COLUMN deleted boolean DEFAULT false,
2023-08-24 05:13:12 +00:00
ADD COLUMN article_id uuid,
ADD COLUMN elastic_page_id uuid,
DROP COLUMN library_item_id,
2023-08-24 03:35:35 +00:00
DROP COLUMN html,
DROP COLUMN color,
DROP COLUMN highlight_type,
DROP COLUMN highlight_position_anchor_index,
DROP COLUMN highlight_position_percent;
DROP TYPE highlight_type;
COMMIT;