Postgres: Unsafe use of new value of enum type
You have forgotten to show us the hint you got:
ERROR:  unsafe use of new value &quot;DONE_BY_PASSED&quot; of enum type activity_state
HINT:  New enum values must be committed before they can be used.

You also forgot to mention that you ran the ALTER TYPE and the ALTER TABLE statements in the same transaction.
Like the hint says, you have to commit the ALTER TYPE before you can use the new enum value.