add pgsql constraints