dev_aliyun
cxt 5 years ago
parent 7766f7bfec
commit d5513dff4f

@ -1,6 +1,6 @@
class ModifyTypeForUserAgents < ActiveRecord::Migration
def up
rename_column :user_agents, :type, :agent_type
# rename_column :user_agents, :type, :agent_type
end
def down

@ -1,8 +1,8 @@
class AddIpForUserActions < ActiveRecord::Migration
def up
add_column :user_actions, :ip, :string
UserAgent.where("agent_type is null").update_all(:agent_type => 1)
# add_column :user_actions, :ip, :string
#
# UserAgent.where("agent_type is null").update_all(:agent_type => 1)
end
def down

Loading…
Cancel
Save