Ad

How Can I Create Migration From Existing Database?

- 1 answer

How can I create migration from existing database? I wanted to do this with Xerton. I try do execute:

php artisan make:migration

But I'm getting this error:

Not enough arguments (missing: "name").

Is it possible to migrate the existing database at once? Without having to migrate the tables separately?

Ad

Answer

When you create a migration you have to specify the name of the migration like this :

php artisan make:migration create_users_table
php artisan make:migration add_votes_to_users_table

With Xerton :

Run php artisan migrate:generate to create migrations for all the table

Ad
source: stackoverflow.com
Ad