You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
class MigrateDefalutToTiding < ActiveRecord::Migration[5.2]
|
|
def change
|
|
change_column_default :tidings, :status, from: nil, to: 0
|
|
|
|
Tiding.where(status: nil).update_all(status: 0)
|
|
end
|
|
end
|