Skip to main content

Posts

Showing posts from April, 2023

How to Execute Database Migrations using Go Migrate

A database migration, also known as a schema migration, is a set of changes to be made to a structure of objects within a relational database 😏. The process of migration helps to change the database schema from its current state to a new desired state, whether it involves adding tables and columns, removing elements, splitting fields, or changing types and constraints. By managing these changes in a programmatic way, it becomes easier to maintain consistency and accuracy in the database, as well as keep track of the history of modifications made to it. Setup and Installation migrate is a CLI tool that you can use to run migrations. You can easily install it on various operating systems such as Linux, Mac and Windows by using package managers like curl, brew, and scoop, respectively. For more information on how to install and use the tool, you can refer to the official documentation. To install the migrate CLI tool using scoop on Windows, you can follow these steps: $ scoop install m