5 changed files with 70 additions and 2 deletions
@ -0,0 +1,9 @@ |
|||||||
|
class ChangeFieldTypes < ActiveRecord::Migration[6.1] |
||||||
|
def up |
||||||
|
change_column :case_logs, :net_income, "integer USING CAST(property_number_of_times_relet AS integer)" |
||||||
|
end |
||||||
|
|
||||||
|
def down |
||||||
|
change_column :case_logs, :net_income, :string |
||||||
|
end |
||||||
|
end |
@ -0,0 +1,21 @@ |
|||||||
|
FactoryBot.define do |
||||||
|
factory :income_range do |
||||||
|
sequence(:id) { |i| i } |
||||||
|
trait :full_time do |
||||||
|
economic_status { "full_time" } |
||||||
|
soft_min { 143 } |
||||||
|
soft_max { 730 } |
||||||
|
hard_min { 90 } |
||||||
|
hard_max { 1230 } |
||||||
|
end |
||||||
|
trait :retired do |
||||||
|
economic_status { "retired" } |
||||||
|
soft_min { 50 } |
||||||
|
soft_max { 370 } |
||||||
|
hard_min { 10 } |
||||||
|
hard_max { 690 } |
||||||
|
end |
||||||
|
created_at { Time.zone.now } |
||||||
|
updated_at { Time.zone.now } |
||||||
|
end |
||||||
|
end |
Loading…
Reference in new issue