class Location

Schema Information

Table name: locations

id                        :bigint           not null, primary key
address_line_1            :text
address_line_2            :text
address_postcode          :text
address_town              :text
gias_establishment_number :integer
gias_local_authority_code :integer
gias_phase                :integer
gias_year_groups          :integer          default([]), not null, is an Array
name                      :text             not null
ods_code                  :string
position                  :geography        point, 4326
site                      :string
status                    :integer          default("unknown"), not null
systm_one_code            :string
type                      :integer          not null
url                       :text
urn                       :string
created_at                :datetime         not null
updated_at                :datetime         not null

Indexes

index_locations_on_ods_code        (ods_code) UNIQUE
index_locations_on_systm_one_code  (systm_one_code) UNIQUE
index_locations_on_urn             (urn) UNIQUE WHERE ((type = 0) AND (site IS NULL))
index_locations_on_urn_and_site    (urn,site) UNIQUE