blacksmith generate migration
This command generates
down files for a SQL migration.
$ blacksmith generate migration \ --name add_user_id \ --path ./warehouse/migrations Generating files: -> Generating migration at ./warehouse/migrations Success!
--name [migration]: Set the name of the migration. It shall be an overview of the migration's changes. It shall be a valid name only containing lowercase letters (
a-z), underscores (
_), and dashes (
$ blacksmith generate migration \ --name add_user_id
--path [path]: Relative path where the migration's files will be generated. If the directories don't exist, they will automatically be created (if possible). If files already exist at the path with the same name of the ones generated by the CLI, an error will be prompted. The CLI will never override existing files.
$ blacksmith generate migration \ --name add_user_id \ --path ./warehouse/migrations
If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the repository. Once we merge it, the changes will be reflected on the website the next time it is deployed.
Thank you for your contributions!