Playlistr: Migrate Up / Migrate Down

Let's define us a database table!

Migrate Up

The migrate scripts are the building blocks of commandbox-migrations. With them you are defining the schema for your database. These scripts are applied by migrate up and rolled back with migrate down.

When you call migrate up the up() method in all your scripts are run. Also the cfmigrations table that was created by the migrate install will be populated with a record of which and when each script was executed. This allows commandbox-migrations to keep a track of what scripts to run when migrate up and migrate down are called.

By calling migrate up the table and the columns defined are created. Check it out! Then calling migrate down will delete or drop the table and all it's records.

yyyy_mm_dd_hhmmss_artists.cfc

CommandBox:playlistr>migrate up
CommandBox:playlistr>migrate down