MAKE

This will add a new migration file base on the default migration stub. Migration stub contains the scaffolding of the migration file.

${{ varName }} = [
	"mode" => "",
	"table"	=> "",
	"primary_key" => "",
	"up" => [
		"" => ""
	],
	"down" => [
		"" => ""
	]
];
  • {{ varName }} will be automatically replaced by the migration file name you enter in the input before you click the make button.

  • The dabase/migrations/ is the directory which our migration files will be stored. This is we called our local repository.

The migration file accepts:

  1. mode: "NEW", "DROP", "CHANGE", "RENAMETABLE"

  2. table: the target table

  3. primary_key: the primary key of the table

  4. up: Run the migrations

  5. down: Reverse the migrations

Last updated