Skip to content

Commit a500041

Browse files
committed
Add phase override to Location model
We will allow users to edit the phase of a school as the information from GIAS is often out-dated/incorrect. We would still want to track GIAS phase as a source of truth so we add a new column to the model instead of overriding the existing one.
1 parent 9fdeea5 commit a500041

4 files changed

Lines changed: 10 additions & 0 deletions

File tree

app/models/location.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# gias_year_groups :integer default([]), not null, is an Array
1616
# name :text not null
1717
# ods_code :string
18+
# phase :string
1819
# position :geography point, 4326
1920
# site :string
2021
# status :integer default("unknown"), not null
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
class AddPhaseToLocations < ActiveRecord::Migration[8.0]
4+
def change
5+
add_column :locations, :phase, :string
6+
end
7+
end

spec/factories/locations.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# gias_year_groups :integer default([]), not null, is an Array
1616
# name :text not null
1717
# ods_code :string
18+
# phase :string
1819
# position :geography point, 4326
1920
# site :string
2021
# status :integer default("unknown"), not null

spec/models/location_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# gias_year_groups :integer default([]), not null, is an Array
1616
# name :text not null
1717
# ods_code :string
18+
# phase :string
1819
# position :geography point, 4326
1920
# site :string
2021
# status :integer default("unknown"), not null

0 commit comments

Comments
 (0)