#!/bin/bash
sudo -u postgres psql -d erp_db -c "UPDATE \"Role\" SET permissions = permissions || '{PURCHASING_MANAGE,SALES_MANAGE}' WHERE name = 'Administrator' AND NOT (permissions @> '{PURCHASING_MANAGE}');"
sudo -u postgres psql -d erp_db -c "SELECT id, name, permissions FROM \"Role\";"
