]> git.openstreetmap.org Git - rails.git/blob - db/migrate/20150528113100_add_foreign_keys_for_issues.rb
Added IssueComments + ForeignKeys + Indexes
[rails.git] / db / migrate / 20150528113100_add_foreign_keys_for_issues.rb
1 require "migrate"
2
3 class AddForeignKeysForIssues < ActiveRecord::Migration
4   def change
5         add_foreign_key :issues, :users, :name => "issues_user_id_fkey"
6         add_foreign_key :reports, :issues, :name => "reports_issue_id_fkey"
7         add_foreign_key :reports, :users, :name => "reports_user_id_fkey"
8         add_foreign_key :issue_comments, :issues, :name => "issue_comments_issue_id_fkey"
9         add_foreign_key :issue_comments, :users, :name => "issue_comments_user_id"
10   end
11 end