class CreateScrapes < ActiveRecord::Migration
def self.up
create_table :scrapes do |t|
t.text :saved_characters
t.text :sanitized_characters
t.string :href
t.timestamps
end
end
def self.down
drop_table :scrapes
end
end
我即将 rake db:migrate 并且我正在考虑是否应该使用属性类型text
or string
。由于saved_characters
并且sanitized_characters
将是具有数千个 unicode 值的数组,它基本上是逗号分隔的数据,我不确定 `:text' 是否真的是正确的方法。你会怎么做?