converted CreateAnchorTriggers.js to PostgreSQL - AERGO-546