The local server is: wampServer creates a laravel5 project using the composer command in the www directory. The version is 5.1.26. In many laravel tutorials, data tables are created using commands, then perform data migration and filling, which is directly related to phpMyAdmin or NavicatP...
The local server is wampServer.
Create a laravel5 project using the composer command in the www directory. The version is 5.1.26.
In many laravel tutorials, you can use commands to create data tables and then perform data migration and filling. Is this different from directly creating tables in phpMyAdmin or Navicat Premium? If so, what are the benefits of using laravel's migration?
After sending this question, understand the laravel series of JellyBool tutorials (https://laravist.com/), here there is a text version (https://jellybool.com/), found the answer in tutorial 4:
You can regard Migration as a database version management tool, such as git's version management for project files, rollback, reset, and so on (view specific commands through the php artisan command)
In fact, using Migration to create a table is the same as creating a table directly. The difference is that using Migration has additional database management functions: rollback, resetting, and updating.
Reply content:
The local server is wampServer.
Create a laravel5 project using the composer command in the www directory. The version is 5.1.26.
In many laravel tutorials, you can use commands to create data tables and then perform data migration and filling. Is this different from directly creating tables in phpMyAdmin or Navicat Premium? If so, what are the benefits of using laravel's migration?
After sending this question, understand the laravel series of JellyBool tutorials (https://laravist.com/), here there is a text version (https://jellybool.com/), found the answer in tutorial 4:
You can regard Migration as a database version management tool, such as git's version management for project files, rollback, reset, and so on (view specific commands through the php artisan command)
In fact, using Migration to create a table is the same as creating a table directly. The difference is that using Migration has additional database management functions: rollback, resetting, and updating.
Use this migration
The advantage is that you can directly retain the structure information of the table below in your project, and because the subsequent SQL statements are actually generated, you do not want to switch from mysql to pqsql one day, sqlite and even oracle will generate table creation statements for you by ORM.
Then, you provide additional version control items to check whether you need these features for evaluation.
Of course, you can also use this tool to create tables in the way you are used.
Include schema into Version Control for easy tracking and deploy
And (as long as the content does not conflict) can be developed in parallel by multiple people