From 0b1049e319f1eb78c3f2b1b741c82f234e45a8d7 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 27 Jun 2019 09:26:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...banks.rb => 20190627012118_modify_quotes_for_gtopic_banks.rb} | 1 + 1 file changed, 1 insertion(+) rename db/migrate/{20190627012117_modify_quotes_for_gtopic_banks.rb => 20190627012118_modify_quotes_for_gtopic_banks.rb} (70%) diff --git a/db/migrate/20190627012117_modify_quotes_for_gtopic_banks.rb b/db/migrate/20190627012118_modify_quotes_for_gtopic_banks.rb similarity index 70% rename from db/migrate/20190627012117_modify_quotes_for_gtopic_banks.rb rename to db/migrate/20190627012118_modify_quotes_for_gtopic_banks.rb index 4c475fd8f..a47157414 100644 --- a/db/migrate/20190627012117_modify_quotes_for_gtopic_banks.rb +++ b/db/migrate/20190627012118_modify_quotes_for_gtopic_banks.rb @@ -1,5 +1,6 @@ class ModifyQuotesForGtopicBanks < ActiveRecord::Migration[5.2] def change + GtopicBank.where("quotes is null").update_all(:quotes => 0) change_column :gtopic_banks, :quotes, :integer, :default => 0 end end