REVOKE UPDATE ON attachments, attachment_jobs FROM worker_role, dispatcher_role ; GRANT UPDATE (state, object_key, variants, error_code, updated_at) ON attachments TO worker_role ; GRANT UPDATE (state, error_code, updated_at) ON attachments TO dispatcher_role ; GRANT UPDATE (state, attempt, lease_token, lease_until, next_attempt_at, published_at, error_code, updated_at) ON attachment_jobs TO worker_role, dispatcher_role ; REVOKE ALL ON schema_migrations FROM api_role ; GRANT SELECT ON schema_migrations TO api_role ;