]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/20160822153115_create_issue_comments.rb
Ensure that issue comments have associated issues and users.
[rails.git] / db / migrate / 20160822153115_create_issue_comments.rb
index e3c379bc1e2bf9ce92d73857028b963a9a0704c7..b41dde8a71a2d848dd13c79da14d7c445b2c8cfd 100644 (file)
@@ -1,9 +1,9 @@
 class CreateIssueComments < ActiveRecord::Migration
   def change
     create_table :issue_comments do |t|
-      t.integer :issue_id
-      t.integer :commenter_user_id
-      t.text :body
+      t.integer :issue_id, :null => false
+      t.integer :commenter_user_id, :null => false
+      t.text :body, :null => false
       t.boolean :reassign
       t.timestamps :null => false
     end