Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

how add an index column in rails

class AddIndexToUsers < ActiveRecord::Migration
  def change
    add_column :users, :name, :string
    add_index :users, :name
  end
end
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #index #column #rails
ADD COMMENT
Topic
Name
7+9 =