O'Reilly logo

Haskell Cookbook by Yogesh Sajanikar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Managing migrations

When you are working on the databases, and trying to abstract the model on the backend at the same time, you already know that you will need a change in the model, database, or both at some point in time. Catering to changes in the requirements, performance criteria, database schema, or the data model on the backend is inevitable. Changing the database schema without breaking the backend becomes an important and time-consuming task.

In this recipe, we will look at migrations and see how Persistent approaches this issue. We will create a simple model and make a change to the model and run migrations again. We will be using SQLite as the backend.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required