Commit 88fd96e9eff7893f78e985451879db5df0a38b12

Authored by Larissa Reis
1 parent d0cc3c8a

Fixes foreign key on profile followers migration

db/migrate/20160608123748_create_profile_followers_table.rb
... ... @@ -12,7 +12,7 @@ class CreateProfileFollowersTable < ActiveRecord::Migration
12 12 t.column :profile_type, :string, :null => false
13 13 end
14 14  
15   - add_foreign_key :profiles_circles, :circles, :on_delete => :nullify
  15 + add_foreign_key :profiles_circles, :circles, :on_delete => :cascade
16 16  
17 17 add_index :profiles_circles, [:profile_id, :circle_id], :name => "profiles_circles_composite_key_index", :unique => true
18 18 add_index :circles, [:person_id, :name], :name => "circles_composite_key_index", :unique => true
... ...
db/schema.rb
... ... @@ -877,5 +877,5 @@ ActiveRecord::Schema.define(version: 20160608123748) do
877 877 add_index "votes", ["voteable_id", "voteable_type"], name: "fk_voteables", using: :btree
878 878 add_index "votes", ["voter_id", "voter_type"], name: "fk_voters", using: :btree
879 879  
880   - add_foreign_key "profiles_circles", "circles", on_delete: :nullify
  880 + add_foreign_key "profiles_circles", "circles", on_delete: :cascade
881 881 end
... ...