Another refactor to user state machine
Add migration file