Skip to content

Commit

Permalink
Create accredited_organizations table (#16296)
Browse files Browse the repository at this point in the history
* create accredited_organizations table

* index poa_code

* add # frozen_string_literal: true

* fix merge conflicts

---------

Co-authored-by: Jonathan VanCourt <[email protected]>
  • Loading branch information
holdenhinkle and jvcAdHoc authored Apr 16, 2024
1 parent a9161d1 commit 0b0ce7e
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
33 changes: 33 additions & 0 deletions db/migrate/20240411160306_create_accredited_organizations.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# frozen_string_literal: true

class CreateAccreditedOrganizations < ActiveRecord::Migration[7.1]
def change
create_table :accredited_organizations, id: :uuid do |t|
t.uuid :ogc_id, null: false
t.string :poa_code, limit: 3, null: false, index: { unique: true }
t.string :name, index: true
t.string :phone
t.string :address_type
t.string :address_line1
t.string :address_line2
t.string :address_line3
t.string :city
t.string :country_code_iso3
t.string :country_name
t.string :county_name
t.string :county_code
t.string :international_postal_code
t.string :province
t.string :state_code
t.string :zip_code
t.string :zip_suffix
t.jsonb :raw_address
t.float :lat
t.float :long
t.geography :location, limit: { srid: 4326, type: 'st_point', geographic: true }
t.timestamps

t.index :location, using: :gist
end
end
end
30 changes: 30 additions & 0 deletions db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0b0ce7e

Please sign in to comment.