August 2019
Intermediate to advanced
486 pages
13h 52m
English
To initiate migration, you should run the following command:
$ truffle migrate
This command will run all of the migration scripts, present under the migrations folder. The migration scripts are always executed in sorted order.
To maintain this sort order, the developer has to ensure that the script's name always starts with a number. Ensure that it follows the <Num>_fileName.js format for a filename. The filename must be prefixed with the number and suffixed with an appropriate name for the file. The following are some examples for filenames:
| Script filename | Script number |
| 1_initial_migration.js | 1 |
| 2_deploymentExample.js | 2 |
| 3_upgrades.js | 3 |