BEGIN;

ALTER TABLE letters_outgoing 
ADD COLUMN IF NOT EXISTS revision_number INTEGER NOT NULL DEFAULT 0;

CREATE INDEX IF NOT EXISTS idx_letters_outgoing_revision_number ON letters_outgoing(revision_number);

COMMIT;