Sha256: efdd4b2a175b02cef7af180644806fcc46f63164a5ff826a7f8063bb28357010
Contents?: true
Size: 777 Bytes
Versions: 1
Compression:
Stored size: 777 Bytes
Contents
class AddMoreColumnTypesToWands < ActiveRecord::Migration[5.1] 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, :chosen_at_date, :date add_column :wands, :chosen_at_time, :time if ENV['RAILS_VERSION'] != '5.1.7' # JSON column type is only supported on 5.2.4 version or higher add_column :wands, :spell_history, :json add_column :wands, :maker_info, :json, null: false, default: '{}' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sorbet-rails-0.2.0 | spec/support/rails_shared/db/migrate/20190622000000_add_more_column_types_to_wands.rb |