-require "migrate"
-
-class CreateIssuesAndReports < ActiveRecord::Migration
+class CreateIssuesAndReports < ActiveRecord::Migration[5.0]
def change
create_table :issues do |t|
t.string :reportable_type, :null => false
-class CreateIssueComments < ActiveRecord::Migration
+class CreateIssueComments < ActiveRecord::Migration[5.0]
def change
create_table :issue_comments do |t|
t.integer :issue_id, :null => false
-class AddReportsCountToIssues < ActiveRecord::Migration
+class AddReportsCountToIssues < ActiveRecord::Migration[5.0]
def change
add_column :issues, :reports_count, :integer, :default => 0
add_foreign_key :issues, :users, :column => :updated_by, :name => "issues_updated_by_fkey", :on_delete => :cascade