diff --git a/db/migrate/20250123145155_enable_postgis_extension.rb b/db/migrate/20250123145155_enable_postgis_extension.rb new file mode 100644 index 00000000..e9d816dd --- /dev/null +++ b/db/migrate/20250123145155_enable_postgis_extension.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class EnablePostgisExtension < ActiveRecord::Migration[8.0] + def change + enable_extension 'postgis' + end +end diff --git a/db/schema.rb b/db/schema.rb index ebf1007e..f865b48d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,9 +10,10 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[8.0].define(version: 2025_01_20_154555) do +ActiveRecord::Schema[8.0].define(version: 2025_01_23_145155) do # These are extensions that must be enabled in order to support this database enable_extension "pg_catalog.plpgsql" + enable_extension "postgis" create_table "action_text_rich_texts", force: :cascade do |t| t.string "name", null: false @@ -177,6 +178,14 @@ ActiveRecord::Schema[8.0].define(version: 2025_01_20_154555) do t.index ["visit_id"], name: "index_points_on_visit_id" end + create_table "spatial_ref_sys", primary_key: "srid", id: :integer, default: nil, force: :cascade do |t| + t.string "auth_name", limit: 256 + t.integer "auth_srid" + t.string "srtext", limit: 2048 + t.string "proj4text", limit: 2048 + t.check_constraint "srid > 0 AND srid <= 998999", name: "spatial_ref_sys_srid_check" + end + create_table "stats", force: :cascade do |t| t.integer "year", null: false t.integer "month", null: false