Rails migrations are used to track and apply database alterations in a reversible manner.
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 destroyI know I can easily create a model with this one line. Now suppose I want to add an index …
ruby-on-rails rails-migrationsCan 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-migrationsIn MySQL (and other SQL databases), it can be helpful to add comments to a table or column whose purpose …
ruby-on-rails activerecord rails-migrationsI'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-migrationsCurrently 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.rbI 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-postgresqlWhat is the difference between t.boolean :is_live, index: true and add_index :table_name, :is_live If there …
activerecord migration rails-migrationsOne of my Rails migrations uses a uuid as the primary key. The Postgres extension gen_random_uuid() should solve …
ruby-on-rails postgresql uuid rails-migrationsThere 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