Hoping someone with laravel experience can help me get off the ground with migrations. I've been reading the docs on migrations and I feel like there's no description of a workflow or any real description of how to use these thigns.
I've also been using the artisan command line to get help:
php artisan help make:migration
But the results are curiously uninformative:
Usage:
make:migration [options] [--] <name>
Arguments:
name The name of the migration.
Options:
--create[=CREATE] The table to be created.
--table[=TABLE] The table to migrate.
--path[=PATH] The location where the migration file should be created.
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
--env[=ENV] The environment the command should run under
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Create a new migration file
What is the significance of a migration's name? Is it the database table's name? Is it the name given to the file created?
Also, there were two files in database/migrations -- I don't recall creating these myself so I think they were somehow created during the initialization phase:
database/migrations/2014_10_12_000000_create_users_table.php
database/migrations/2014_10_12_100000_create_password_resets_table.php
I also created a couple with these commands I ran across in the configuration documents:
php artisan cache:table
php artisan session:table
which added these two files:
database/migrations/2017_02_23_222755_create_cache_table.php
database/migrations/2017_02_23_222435_create_sessions_table.php
However, despite the obvious existence of these migration files, this command says I have no migrations:
$ php artisan migrate:status
No migrations found.
I'm sitting here with a database full of tables and would like to get started with the process but lack any real overview of the process. I'm aware that these migration files:
track database changes for the purpose of collaborating with other devs via version control
are sequentially named with timestamps which permit versioning/ordering rollbacks
* when run, will actually perform the necessary database changes
However, I don't know which commands to run first, I don't know how to run these php migration files to perform the changes they contain, etc.
If anyone could suggest how I might get acquainted with the workflow, I'd greatly appreciate it.