Reputation: 621
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?
Upvotes: 0
Views: 3798
Reputation:
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
Upvotes: 2
Reputation: 914
According to Xerton documentation you have to use php artisan migrate:generate
command to generate migrations from existing database.
php artisan make:migration [name]
is used to create new migration.
Upvotes: 0