Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

rails change reference

class RemoveClientFromUser < ActiveRecord::Migration
  def change
    remove_reference :users, :client, index: true, foreign_key: true
    add_reference :users, :model_name, index: true, foreign_key: true
  end
end
 
PREVIOUS NEXT
Tagged: #rails #change #reference
ADD COMMENT
Topic
Name
7+2 =