Now we have defined all our migrations. To change the schema of our database, we need to execute all of them. We have already installed the
sequel gem and we have five migration files in the
So, for sequel to create the tables, we need to create a database first. In the command prompt, we type the following command:
mysql -u root -p
This will open the MySQL shell by entering the password for the
root user. You can also use
mysql -u user -p if you want to use a different user for the application:
mysql> create database todo;
This will create a database named
todo. Now we need to execute the migration files to populate the tables.
Now, close the MySQL console and run the following command on the console ...