Fixes migrations and console env