Thinking Elixir Podcast cover image

22: Running migrations in production with Patryk Bąk

Thinking Elixir Podcast

00:00

How to Rename a Field?

Migration can be processed for a while, so we should deploy everything in steps. Instead of renaming the currently existing field, which can cause the problem I've just mentioned, we can just create a migration that adds a new field with the new name. And if we also deployed a new logic, it will use this new field, which might be not ready yet, as the migration will be not finished. But more, we need to add the logic, which will update this new field for new records. Of course, to avoid problems, which I discussed today, we should deployment everything in steps,. The last tip was on tables. This one's on fields.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app