Xethron / migrations-generator

Laravel Migrations Generator: Automatically generate your migrations from an existing database schema.
MIT License
3.33k stars 588 forks source link

What happens when structure of the table Changes? #163

Open lohiloki opened 6 years ago

lohiloki commented 6 years ago

HI Xethron, thanks for the plugin. I am using laravel voyager framework where i can create table from laravel backend and after that using your plugin I am able to create migration plugin. But when i changed the column name or column datatype or added new column or If i delete table itself and when i run your plugin php artisan migrate tablename(same tablename twice). It creates same migration files. How to update(alter) same table using migration file. Do we have any commands in your plugin to achieve that. Help me out in this as I am new to Laravel and Laravel Voyager. thanks in advance

moazam1 commented 6 years ago

It would be great if you could add sync command.

lohiloki commented 6 years ago

How to add sync command?

tasaduq commented 6 years ago

I think OP is looking after what I was trying to search.

The plugin right now can generate create_table migrations for all the existing tables, is there a way to generate modifications as well?

I doubt this, this plugin will become a lifesaver in my case. Developers in my team wouldn't be required to create Laravel migrations manually and they could just create database tables and run generate migration command to generate the migrations according to already created table columns.