Skip to content

Commit

Permalink
Add application_type_overrides to local_authority
Browse files Browse the repository at this point in the history
  • Loading branch information
EGiataganas committed Dec 18, 2024
1 parent b6fe095 commit f133f46
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

class AddApplicationTypeOverridesToLocalAuthority < ActiveRecord::Migration[7.2]
def change
add_column :local_authorities, :application_type_overrides, :jsonb, default: []

up_only do
LocalAuthority.reset_column_information

LocalAuthority.find_each do |local_authority|
local_authority.update!(application_type_overrides: [{"code" => "preApp", "determination_period_days" => 30}])
end
end
end
end
1 change: 1 addition & 0 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@
t.string "document_checklist"
t.string "planning_policy_and_guidance"
t.string "notify_error_status"
t.jsonb "application_type_overrides", default: []
t.boolean "planning_history_enabled", default: false, null: false
t.index ["subdomain"], name: "index_local_authorities_on_subdomain", unique: true
end
Expand Down

0 comments on commit f133f46

Please sign in to comment.