the type of column can be string or text

class CreateAuthorities < ActiveRecord::Migration[5.2]
  def change
    create_table :authorities do |t|
      t.string :role_ids, array: true, default: [], comment: '角色数组'
      t.timestamps
    end
  end
end
0条评论 顺序楼层
请先登录再回复