DROP TABLE IF EXISTS issue_dependencies;

DROP INDEX IF EXISTS idx_issues_parent;
ALTER TABLE issues DROP CONSTRAINT IF EXISTS issues_priority_check;
ALTER TABLE issues DROP CONSTRAINT IF EXISTS issues_parent_not_self;
ALTER TABLE issues DROP COLUMN IF EXISTS priority;
ALTER TABLE issues DROP COLUMN IF EXISTS parent_id;
