The local server is: Wampserver
A new Laravel5 project was created with the composer command under the WWW directory, and the version is 5.1.26
In many laravel introductory tutorials, you create data tables with commands, and then migrate and populate them, what's the difference between building a table directly in phpMyAdmin or Navicat premium? If it is the same, then what are the benefits of using Laravel's migration?
After this issue, learn about Jellybool's Laravel series tutorial (https://laravist.com/), here is the text version (https://jellybool.com/), in tutorial four found the answer:
Migration can be thought of as a database version of the management tool, such as Git version of the project file management, you can rollback,reset (through the PHP artisan command to see the specific command)
So actually using migration to create a table is the same as creating a table directly, except that using migration has the additional ability to manage the database: Rollback/reset/update, etc.
Reply content:
The local server is: Wampserver
A new Laravel5 project was created with the composer command under the WWW directory, and the version is 5.1.26
In many laravel introductory tutorials, you create data tables with commands, and then migrate and populate them, what's the difference between building a table directly in phpMyAdmin or Navicat premium? If it is the same, then what are the benefits of using Laravel's migration?
After this issue, learn about Jellybool's Laravel series tutorial (https://laravist.com/), here is the text version (https://jellybool.com/), in tutorial four found the answer:
Migration can be thought of as a database version of the management tool, such as Git version of the project file management, you can rollback,reset (through the PHP artisan command to see the specific command)
So actually using migration to create a table is the same as creating a table directly, except that using migration has the additional ability to manage the database: Rollback/reset/update, etc.
Use this migration
The advantage is that you can keep the structure information of the following table directly in your project, and because the subsequent SQL is actually generated, someday you don't want to switch to pqsql with MySQL, SQLite or even Oracle will generate the statement for you by ORM.
Then there are additional versioning aspects to see if you need these features to make an assessment.
Of course you can not use this tool completely, in your own way to build a table, and nothing wrong
Incorporate schema into version control for easy tracking and deploy
and (as long as content does not conflict) can be developed in parallel by multiple people