Browse Source

switched to int for confirm

pull/671/head
JG 3 years ago
parent
commit
5892cab7c6
  1. 4
      app/models/scheme.rb
  2. 2
      db/migrate/20220623132228_add_has_other_client_group_field.rb
  3. 2
      db/schema.rb

4
app/models/scheme.rb

@ -79,8 +79,8 @@ class Scheme < ApplicationRecord
}.freeze }.freeze
HAS_OTHER_CLIENT_GROUP = { HAS_OTHER_CLIENT_GROUP = {
"Yes": "yes", No: 0,
"No": "no", Yes: 1,
}.freeze }.freeze
enum intended_stay: INTENDED_STAY, _suffix: true enum intended_stay: INTENDED_STAY, _suffix: true

2
db/migrate/20220623132228_add_has_other_client_group_field.rb

@ -1,7 +1,7 @@
class AddHasOtherClientGroupField < ActiveRecord::Migration[7.0] class AddHasOtherClientGroupField < ActiveRecord::Migration[7.0]
def change def change
change_table :schemes, bulk: true do |t| change_table :schemes, bulk: true do |t|
t.column :has_other_client_group, :string t.column :has_other_client_group, :integer
end end
end end
end end

2
db/schema.rb

@ -310,7 +310,7 @@ ActiveRecord::Schema[7.0].define(version: 2022_06_29_105452) do
t.integer "support_type" t.integer "support_type"
t.string "intended_stay" t.string "intended_stay"
t.datetime "end_date" t.datetime "end_date"
t.string "has_other_client_group" t.integer "has_other_client_group"
t.bigint "stock_owning_organisation_id" t.bigint "stock_owning_organisation_id"
t.index ["organisation_id"], name: "index_schemes_on_organisation_id" t.index ["organisation_id"], name: "index_schemes_on_organisation_id"
t.index ["stock_owning_organisation_id"], name: "index_schemes_on_stock_owning_organisation_id" t.index ["stock_owning_organisation_id"], name: "index_schemes_on_stock_owning_organisation_id"

Loading…
Cancel
Save