Skip to content

Commit b793f51

Browse files
committed
Fix R*Tree migration example in CHANGELOG.md
- Change table creation syntax from create table(:geo_regions, rtree: true) to create table(:geo_regions, options: [rtree: true]) to properly set table.options - Remove explicit id column addition (Ecto creates it automatically) - Normalize wording to 'multidimensional' for consistency - Align with test patterns in test/rtree_test.exs and adapter's Keyword.get(table.options, :rtree, false) check
1 parent 97222c3 commit b793f51

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Added
1111

1212
- **R*Tree Spatial Indexing Support**
13-
- Full support for SQLite R*Tree virtual tables for multi-dimensional spatial indexing
14-
- **Table creation**: Use `:rtree => true` option in Ecto migrations
13+
- Full support for SQLite R*Tree virtual tables for multidimensional spatial indexing
14+
- **Table creation**: Use `options: [rtree: true]` in Ecto migrations
1515
- **Dimensions supported**: 1D to 5D (3 to 11 columns total including ID)
1616
- **Column structure**: First column must be `id` (integer primary key), followed by min/max coordinate pairs
1717
- **Validation**: Automatic validation of column count (odd numbers only), first-column requirements (must be 'id'), dimensional constraints, and incompatible table options
1818
- **Table options**: R*Tree virtual tables reject standard table options (`:strict`, `:random_rowid`, `:without_rowid`) with clear error messages
1919
- **Use cases**: Geographic bounding boxes, collision detection, time-range queries, spatial indexing
2020
- **Migration example**:
2121
```elixir
22-
create table(:geo_regions, rtree: true) do
23-
add :id, :integer, primary_key: true
22+
create table(:geo_regions, options: [rtree: true]) do
2423
add :min_lat, :float
2524
add :max_lat, :float
2625
add :min_lng, :float

0 commit comments

Comments
 (0)