Hi,
i want to delete all Users from the Exchange synchronisation, how can i do that?
i tried with the shell like:
User.find_by(created_by_id: ‘1’).destroy
but i get this error:
ActiveRecord::InvalidForeignKey: PG::ForeignKeyViolation: ERROR: update or delete on table “users” violates foreign key constraint “fk_rails_45307c95a3” on table "users"
DETAIL: Key (id)=(1) is still referenced from table “users”.
: DELETE FROM “users” WHERE “users”.“id” = $1
from (irb):9
it would also help to delete all Users with the customer role
regards
celevra