Browse Source

Migrate the remaining checkbox fields to integer; (#80)

pull/85/head
kosiakkatrina 3 years ago committed by GitHub
parent
commit
dc35b066a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      db/migrate/20211108091320_change_checkbox_types.rb
  2. 6
      db/schema.rb

15
db/migrate/20211108091320_change_checkbox_types.rb

@ -0,0 +1,15 @@
class ChangeCheckboxTypes < ActiveRecord::Migration[6.1]
def up
change_table :case_logs, bulk: true do |t|
t.change :accessibility_requirements_prefer_not_to_say, "integer USING accessibility_requirements_prefer_not_to_say::integer"
t.change :condition_effects_prefer_not_to_say, "integer USING condition_effects_prefer_not_to_say::integer"
end
end
def down
change_table :case_logs, bulk: true do |t|
t.change :accessibility_requirements_prefer_not_to_say, "boolean USING accessibility_requirements_prefer_not_to_say::boolean"
t.change :condition_effects_prefer_not_to_say, "boolean USING condition_effects_prefer_not_to_say::boolean"
end
end
end

6
db/schema.rb

@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2021_11_05_164644) do ActiveRecord::Schema.define(version: 2021_11_08_091320) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
@ -114,7 +114,7 @@ ActiveRecord::Schema.define(version: 2021_11_05_164644) do
t.integer "housingneeds_f" t.integer "housingneeds_f"
t.integer "housingneeds_g" t.integer "housingneeds_g"
t.integer "housingneeds_h" t.integer "housingneeds_h"
t.boolean "accessibility_requirements_prefer_not_to_say" t.integer "accessibility_requirements_prefer_not_to_say"
t.integer "illness_type_1" t.integer "illness_type_1"
t.integer "illness_type_2" t.integer "illness_type_2"
t.integer "illness_type_3" t.integer "illness_type_3"
@ -125,7 +125,7 @@ ActiveRecord::Schema.define(version: 2021_11_05_164644) do
t.integer "illness_type_7" t.integer "illness_type_7"
t.integer "illness_type_9" t.integer "illness_type_9"
t.integer "illness_type_10" t.integer "illness_type_10"
t.boolean "condition_effects_prefer_not_to_say" t.integer "condition_effects_prefer_not_to_say"
t.integer "rp_homeless" t.integer "rp_homeless"
t.integer "rp_insan_unsat" t.integer "rp_insan_unsat"
t.integer "rp_medwel" t.integer "rp_medwel"

Loading…
Cancel
Save