From fee43f52a7a20f168582f517b3c8b35cac4a9b21 Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Fri, 17 Jan 2020 13:53:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...00117032213_add_issue_priosity_to_table.rb | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/db/migrate/20200117032213_add_issue_priosity_to_table.rb b/db/migrate/20200117032213_add_issue_priosity_to_table.rb index cd77d8a97..55640ea9a 100644 --- a/db/migrate/20200117032213_add_issue_priosity_to_table.rb +++ b/db/migrate/20200117032213_add_issue_priosity_to_table.rb @@ -1,9 +1,16 @@ +# encoding: UTF-8 class AddIssuePriosityToTable < ActiveRecord::Migration[5.2] - def change - name = %w(低 正常 高 紧急 立刻) - position = %w(1 2 3 4 5) - name.each_with_index do |n, index| - IssuePriority.create!(name:n, position: position[index]) - end - end + #本地需要修改,线上不用修改 + # def change + # create_table :issue_priorities do |t| + # t.string :name, charset: :utf8 + # t.integer :position + # t.timestamps + # end + # name = %w(低 正常 高 紧急 立刻) + # position = %w(1 2 3 4 5) + # name.each_with_index do |n, index| + # IssuePriority.create!(name:n.to_s, position: position[index]) + # end + # end end