mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2025-03-11 09:02:48 +00:00
Add spatial indexes on address table
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
febb68e702
commit
70cb96dc96
1 changed files with 13 additions and 0 deletions
|
@ -0,0 +1,13 @@
|
|||
defmodule Mobilizon.Storage.Repo.Migrations.AddIndexesToAddresses do
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
create_if_not_exists(index("addresses", ["st_x(geom)"], name: "idx_addresses_geom_x"))
|
||||
create_if_not_exists(index("addresses", ["st_y(geom)"], name: "idx_addresses_geom_y"))
|
||||
end
|
||||
|
||||
def down do
|
||||
drop_if_exists(index("addresses", ["st_x(geom)"], name: "idx_addresses_geom_x"))
|
||||
drop_if_exists(index("addresses", ["st_y(geom)"], name: "idx_addresses_geom_y"))
|
||||
end
|
||||
end
|
Loading…
Add table
Reference in a new issue