From be800816238fb764b8d4851a910f818c3db37ec3 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 19 Jul 2019 18:39:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20190719062616_add_ip_for_user_actions.rb | 10 ---------- db/migrate/20190719062617_add_ip_for_user_actions.rb | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 db/migrate/20190719062616_add_ip_for_user_actions.rb create mode 100644 db/migrate/20190719062617_add_ip_for_user_actions.rb diff --git a/db/migrate/20190719062616_add_ip_for_user_actions.rb b/db/migrate/20190719062616_add_ip_for_user_actions.rb deleted file mode 100644 index 59b41dee..00000000 --- a/db/migrate/20190719062616_add_ip_for_user_actions.rb +++ /dev/null @@ -1,10 +0,0 @@ -class AddIpForUserActions < ActiveRecord::Migration - def up - # add_column :user_actions, :ip, :string - # - # UserAgent.where("agent_type is null").update_all(:agent_type => 1) - end - - def down - end -end diff --git a/db/migrate/20190719062617_add_ip_for_user_actions.rb b/db/migrate/20190719062617_add_ip_for_user_actions.rb new file mode 100644 index 00000000..d1297176 --- /dev/null +++ b/db/migrate/20190719062617_add_ip_for_user_actions.rb @@ -0,0 +1,10 @@ +class AddIpForUserActions < ActiveRecord::Migration + def up + add_column :user_actions, :ip, :string + + UserAgent.where("agent_type is null").update_all(:agent_type => 1) + end + + def down + end +end