Sitemap

We might ignore migrations but they are very important

2 min readAug 16, 2026

--

Migration for us here will refer to databases. Wait what ? Why migrations in databases you may ask ? Actually it is very integral, useful, and super beneficial part of databases. Let us talk about it here.

Database migrations are way of changing the structure of database as things are added through the files. Like we are adding some new table, changing relationship between tables migrations help us. We can add a new attribute using migrations very easily and it does not affect the previous table in a way which is not good. But still like what is it like even what do they even do, that we are talking about them ? So Let us talk about some use cases of migrations.

Migrations mainly help when working with large databases where change comes every instance and putting the changes in the same database or same way is not generally considered good and may hamper the team performance as well people will comfortably be able to add their features to the databases without causing issues to the other persons adding their values to the databases as each migration copy is added or different from the previous as the features are being added. It has a very useful feature of allowing databases to evolve safely. All the files generally keep getting updated, migrations provides to be very useful for this.

Get Sankalp’s stories in your inbox

Join Medium for free to get updates from this writer.

You can add any feature you want adding a column, removing it, updating the name of it, changing key constraints all available.

But a very important thing to talk about is when a new migration is created what exactly does it store, like does it store a new database with added features or does it store a new table ? Well the answer to it is that migrations is not actually a new table or database, it is actually the new added feature, wait what ? Let us say migration001 contains user with certain attributes, now we need new feature product which moves to migration002, but does migration002 contain the user which was there in migration001 ? The answer to it is no it only contais the new feature which was added to the database.

Press enter or click to view image in full size

Conclusion is that migrations are very useful features if used they can solve many issues and are very helpful in general.

Thank you, hope you had a good read 😊.

--

--