Sha256: cf725ac76d741e21fe74887fa276d7be76a7b1e0cc24a68c47de34d002119ead
Contents?: true
Size: 859 Bytes
Versions: 45
Compression:
Stored size: 859 Bytes
Contents
# typed: true class AddMoreColumnTypesToWands < ActiveRecord::Migration[6.0] def change add_column :wands, :flexibility, :float, null: false, default: 0.5 add_column :wands, :hardness, :decimal, null: false, precision: 10, scale: 10, default: 5 add_column :wands, :reflectance, :decimal, null: false, precision: 10, scale: 0, default: 0.5 add_column :wands, :broken, :boolean, null: false, default: false add_column :wands, :broken_at, :datetime, null: true add_column :wands, :chosen_at_date, :date add_column :wands, :chosen_at_time, :time # JSON column type is only supported on 5.2 or higher unless ['5.0', '5.1'].include?(ENV['RAILS_VERSION']) add_column :wands, :spell_history, :json add_column :wands, :maker_info, :json, null: false, default: '{}' end end end
Version data entries
45 entries across 31 versions & 1 rubygems