Files
omnivore/packages/db/migrations/0044.undo.rename_abuse_report_table.sql
2022-02-11 09:24:33 -08:00

15 lines
375 B
PL/PgSQL
Executable File

-- Type: UNDO
-- Name: rename_abuse_report_table
-- Description: Rename the abuse report table so it can be used by typeorm more effeciently
BEGIN;
CREATE TYPE report_type AS ENUM ('SPAM', 'ABUSIVE', 'CONTENT_VIOLATION');
ALTER TABLE omnivore.abuse_report RENAME TO abuse_reports;
ALTER TABLE omnivore.abuse_reports
ALTER COLUMN report_types TYPE report_type[];
COMMIT;