samedi 6 juin 2015

Rails : Why shouldn't I directly make changes directly in schema than do migrate

I am using ruby on rails for an application. I am developing it on my local server as of now.

Everytime I need to make a change to the database, I need to create a migration. Why can't I directly make changes in schema.rb itself?

I am allowed to reset the database and reset all values in the tables. I came across a problem where I needed to change date format from "dateTime" to "timestamp". Now there are just too many fields to change. Why can't I just change them in schema.rb?

Aucun commentaire:

Enregistrer un commentaire