Is possible to generate migration schema from existing database in lumen/laravel 5.2 ? is there any package?
I connect lumen to magento database, now I need to use eloquent. I dont have time to make migration model for every table.
You can dump database first with mysqldump tool to the sql file and then in your migration you can do somethink like this:
public function up()
{
$path = 'path_to_sql/dump.sql';
DB::unprepared(file_get_contents($path));
}
Some easy way I found:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With