]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/20160822153055_create_issues_and_reports.rb
Ensure reports have an issue id and a user id
[rails.git] / db / migrate / 20160822153055_create_issues_and_reports.rb
index ce2374c3118c3e95ce26d792d930943b8420f71b..cd0dc7a9f9cfd0998399b9fe797ef8316bf03d1b 100644 (file)
@@ -21,8 +21,8 @@ class CreateIssuesAndReports < ActiveRecord::Migration[5.0]
     add_index :issues, :updated_by
 
     create_table :reports do |t|
     add_index :issues, :updated_by
 
     create_table :reports do |t|
-      t.integer :issue_id
-      t.integer :user_id
+      t.integer :issue_id, :null => false
+      t.integer :user_id, :null => false
       t.text :details, :null => false
       t.string :category, :null => false
       t.timestamps :null => false
       t.text :details, :null => false
       t.string :category, :null => false
       t.timestamps :null => false