Suppose you have a simple database, world. Below is the database diagram:
The songs database has the following relationship between tables:
countries— stores the name and capital of all countries in the world;country_stats— stores the statistics of each country, each country only has one description of statistics;continents— stores the name of the continents, each continent has one or many countries;
Your task is to run independent (single) migrations using the db.Migrator() interface to propagate the following changes to the world database:
- Rename the
country_statstable tocountry_statistics; - Add the
gdpcolumn to thecountry_statisticstable;