ALTER TABLE mail_accounts
    ADD CONSTRAINT mail_accounts_credentials_encrypted_chk
    CHECK (
        credentials IS NULL
        OR substring(credentials from 1 for 5) = 'UMC1|'::bytea
    ) NOT VALID;
