Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel development: Implication when creating MySQL database manually

Tags:

php

mysql

laravel

I'm in the process of building a Laravel application and I started with the database design. I implemented this directly on the commandline (mysql).

Now, I have this lingering concern as for what this could lead to in the coming development cycles.

I do know that I miss out on the version control as well as the rollback of database structure changes that php artisan provides.

  • Are there other Laravel/PHP specific aspects I should keep in mind?
  • Would you (Laravel developer), recommend that I recreate the entire database structure using php artisan make:migration?

I could really use your input based on this situation of Laravel/PHP development in many cycles without database migration control?

Please advice.

like image 702
Paulie-C Avatar asked Mar 02 '26 05:03

Paulie-C


1 Answers

Yes, In my opinion you should go for using migrations. Migrations provide a great interface to change database structure in version controlled manner.

For instance, If in future you have to move from mysql to some other database system. Following your current approach your would have to create all the db structures according to the new system.

While using migrations, you just have to update a config file for the db driver. And you are done.

like image 74
Nauman Zafar Avatar answered Mar 03 '26 20:03

Nauman Zafar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!