background preloader

Programming

Facebook Twitter

Learn Ruby The Hard Way — Learn Ruby The Hard Way. Migrations. 1 Migration Overview Migrations are a convenient way to alter your database schema over time in a consistent and easy way.

Migrations

They use a Ruby DSL so that you don't have to write SQL by hand, allowing your schema and changes to be database independent. You can think of each migration as being a new 'version' of the database. A schema starts off with nothing in it, and each migration modifies it to add or remove tables, columns, or entries. Active Record knows how to update your schema along this timeline, bringing it from whatever point it is in the history to the latest version. Ruby Essentials. Ruby Programming Language.