Skip to content

Commit

Permalink
Update geometry schema dump tests for database version compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff.dean committed Mar 4, 2025
1 parent 15a23f2 commit d227881
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/tasks_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ def test_index_schema_dump
ActiveRecord::SchemaDumper.dump(connection, file)
end
data = File.read(tmp_sql_filename)
assert_includes data, %(t.geometry "latlon", limit: {type: "point", srid: 0}, null: false)
if connection.database_version >= "8.0.0"
assert_includes data, %(t.geometry "latlon", limit: {type: "point", srid: 0}, null: false)
else
assert_includes data, %(t.geometry "latlon", limit: {:type=>"point", :srid=>0}, null: false)
end
assert_includes data, %(t.index ["latlon"], name: "index_spatial_test_on_latlon", type: :spatial)
end

Expand Down

0 comments on commit d227881

Please sign in to comment.