]> cat aescling's git repositories - mastodon.git/commitdiff
Fix spoiler_text not having "not null" constraint
authorEugen Rochko <eugen@zeonfederated.com>
Wed, 25 Jan 2017 14:24:19 +0000 (15:24 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Wed, 25 Jan 2017 14:24:19 +0000 (15:24 +0100)
db/migrate/20170125145934_add_spoiler_text_to_statuses.rb
db/schema.rb

index e4065d7db0aa40f99d9ff4f1b457366a5d93c69e..2c43210babdff86e06f98c851f7ee50aabd961d4 100644 (file)
@@ -1,5 +1,5 @@
 class AddSpoilerTextToStatuses < ActiveRecord::Migration[5.0]
   def change
-    add_column :statuses, :spoiler_text, :text, default: ""
+    add_column :statuses, :spoiler_text, :text, default: "", null: false
   end
 end
index ee4dd431680b870d7963015e2fb41f52a803a6c0..72ce63133e489aa88771988becf4c9b93a87351a 100644 (file)
@@ -196,7 +196,7 @@ ActiveRecord::Schema.define(version: 20170125145934) do
     t.integer  "visibility",             default: 0,     null: false
     t.integer  "in_reply_to_account_id"
     t.integer  "application_id"
-    t.text     "spoiler_text",           default: ""
+    t.text     "spoiler_text",           default: "",    null: false
     t.index ["account_id"], name: "index_statuses_on_account_id", using: :btree
     t.index ["in_reply_to_id"], name: "index_statuses_on_in_reply_to_id", using: :btree
     t.index ["reblog_of_id"], name: "index_statuses_on_reblog_of_id", using: :btree