Rails: Alter migrations during early development phases

前端 未结 6 585
栀梦
栀梦 2021-02-04 22:08

During the very early phases of development in a Rails app, I prefer to modify the migrations files directly to add new columns (fields) to my tables (models) instead of piling

6条回答
  •  深忆病人
    2021-02-04 22:42

    Found out we can combine everything in one command:

    rake db:drop db:create db:migrate db:seed
    

    Using a shell aliase makes it a snap to redo all old migrations.

提交回复
热议问题