Laravel Development: When Creating MySQL Database Manually

I am developing a Laravel application and I started by developing a database. I have implemented this directly on the command line ( mysql

).

I now have this lingering concern that this could lead to upcoming development cycles.

I know I missed out on version control as well as rolling back the database structure changes that it php artisan

provides.

  • Are there any other aspects of Laravel / PHP that I should keep in mind?
  • If you (Laravel developer) would recommend me to recreate the entire database structure with php artisan make:migration

    ?

I could use your input based on this Laravel / PHP development situation in many loops without managing the database migration?

Please advice.

+3


source to share


1 answer


Yes, in my opinion you should use migrations

. Migrations provide an excellent interface for changing the structure of a versioned database.

For example, if in the future you need to switch from mysql

to another database system. Following your current approach, you will need to create all db structures to match the new system.



When using migrations, you just need to update the config file for the db driver. And you're done.

+3


source







All Articles