Skip to content

Commit

Permalink
Fix locking migration on statuses table. Nullable column and NO defau…
Browse files Browse the repository at this point in the history
…lt value (#4825)
  • Loading branch information
Gargron committed Sep 6, 2017
1 parent dd5cb50 commit 11bddd3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# reblogs_count :integer default(0), not null
# language :string
# conversation_id :integer
# local :boolean default(FALSE)
# local :boolean
#

class Status < ApplicationRecord
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20170905165803_add_local_to_statuses.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class AddLocalToStatuses < ActiveRecord::Migration[5.1]
def change
add_column :statuses, :local, :boolean, null: true, default: false
add_column :statuses, :local, :boolean, null: true, default: nil
end
end
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@
t.integer "reblogs_count", default: 0, null: false
t.string "language"
t.bigint "conversation_id"
t.boolean "local", default: false
t.boolean "local"
t.index ["account_id", "id"], name: "index_statuses_on_account_id_id"
t.index ["conversation_id"], name: "index_statuses_on_conversation_id"
t.index ["in_reply_to_id"], name: "index_statuses_on_in_reply_to_id"
Expand Down

0 comments on commit 11bddd3

Please sign in to comment.