Fix migrations

They had got out of sync with the code base.

- Import the utc method from bucket
- Import the config module in a more robust way so that the tokens can be imported as well.