Circumventing migrations

Hello everyone. I’m just beginning my journey with rails and I have
many questions though I’ll start with just one. I was wondering what
happens if you undermine a migration by changing the database schema
manually. For example. I generate a model and in the first migration I
create a table with an fname and lname column. I then manually remove
the lname column using my favorite SQL administration tool. Forgetting
that I’ve made that manual alteration I then create a second migration
that adds and email column. When i apply that migration will the model
be aware that the db structure was modified outside of the migration
sequence and re-apply the missing column? Thanks much.

I was wondering what happens if you undermine a migration by
changing the database schema
manually.

Don’t do that. You’ll be happier.

No it won’t.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs