Top "Rails-migrations" questions

Rails migrations are used to track and apply database alterations in a reversible manner.

Remove Model and Table so can start again in Rails

I created a model for comments at the start of a project, but have now come to the realisation I …

ruby-on-rails models polymorphic-associations rails-migrations destroy
Creating model and index through one-line command?

I know I can easily create a model with this one line. Now suppose I want to add an index …

ruby-on-rails rails-migrations
Managing mongoid migrations

Can someone give me a short introduction to doing DB migrations in Rails using Mongoid? I'm particularly interested in lazy …

ruby-on-rails mongoid database-migration rails-migrations
Can I add comments to a table or column using ActiveRecord Migrations?

In MySQL (and other SQL databases), it can be helpful to add comments to a table or column whose purpose …

ruby-on-rails activerecord rails-migrations
Rails Migration Error w/ Postgres when pushing to Heroku

I'm trying to perform the following up migration to change the column "number" in the "tweet" model's table class ChangeDataTypeForTweetsNumber &…

ruby-on-rails postgresql heroku rails-migrations
schema.rb messed up due to migrations in other branches

Currently I'm working with a huge rails application and multiple branches with each a new feature for this application. It …

ruby-on-rails rails-migrations schema.rb
How to add sequences to a migration and use them in a model?

I want to have a "Customer" Model with a normal primary key and another column to store a custom "Customer …

ruby-on-rails ruby-on-rails-3.1 rails-migrations rails-models rails-postgresql
Rails ActiveRecord::Migration what is the difference between index: true and add_index?

What is the difference between t.boolean :is_live, index: true and add_index :table_name, :is_live If there …

activerecord migration rails-migrations
Rails Migration to convert string to integer using conversion

There is a good question here I want to elaborate on. I am trying to convert a column in my …

postgresql ruby-on-rails-4 rails-migrations