Can I import a mysql dump to a laravel migration?

后端 未结 10 2067
离开以前
离开以前 2020-12-24 11:46

I have a complete database and need to create migration. I guess there must be a way to do it from a dump but not sure. Is there any way automatically or at least easier to

10条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-24 12:05

    You can use Raahul/Larryfour Package, A model and migration generator for Laravel 4

    Raahul/Larryfour Package

    After insallation you can use a command line to create a migration from existed database like this:

    php artisan raahul:fromdb --only yourdatabase
    

    And you will find the migration in app/migrations/ folder

提交回复
热议问题