Init
The init command allow you to boilerplate some files:
- A
migrationsfolder where you will write your migrations. - A
.migfolder where mig stores its configuration and the main file to run migrations. - A migration file to setup the table that will store the migration versions.
Flags
--mig-folderis the folder where mig stores its configuration and the main file to run migrations. Default is.mig.--packageis the package name of the migrations. Default ismigrations.--folderis the folder where you will write your migrations. Default ismigrations.--schema-version-tableis the table that will store the migration versions. Default ispublic.mig_schema_versions.
Note
When you set a flags with the mig init command, it can be useful to add them in the context command to avoid passing them each time you run a command.