Is it possible to create a migration scheme from an existing database in lumen / laravel 5.2? is there any package?
I connect lumen to the magento database, now I need to use eloquence. I do not have time to create a migration model for each table.
You can dump the database first with the mysqldump tool into the sql file, and then in your migration you can do something like this:
public function up() { $path = 'path_to_sql/dump.sql'; DB::unprepared(file_get_contents($path)); }
Some easy way I found: