简体   繁体   中英

How to import db:schema diff into the database in rails?

i know that is should use migrations, just asking. it would be useful/beautiful to be able work on local mysql database adding fields, indexes etc. and then

  • schema dump
  • git push heroku ...
  • heroku db:schema:diff:apply <- !!! without loosing remote data

i know

  • can't haddle table/fields rename case
  • this is bat babbit

i really like to use great db managers like SQLyog, why can't I? I can't if i hawe to write every change in migration file by hand.

is this possible? is there similar plugin?

ps: i know about this beauty:

this is exactly what I'm looking for. Problem is that it is for old rails, and not suported anymore

thx

this is it! by author words dynamite!

handles

  • filed size changes
  • filed create/drop
  • create/drop indices

pached to work with schema-auto.rb and not schema.rb

great!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM