Browse Source

Only create the custom gist index when it does not yet exist.

develop
Bèr Kessels 4 months ago
parent
commit
1aa7419cb1
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      app/projections/addresses.rb

+ 1
- 1
app/projections/addresses.rb View File

@@ -37,7 +37,7 @@ module Hours
def index_gist
col = :location
name = "#{ADDRESS_TABLE_NAME}_#{col}"
"CREATE INDEX #{name} ON #{ADDRESS_TABLE_NAME} USING GIST(#{col})"
"CREATE INDEX IF NOT EXISTS #{name} ON #{ADDRESS_TABLE_NAME} USING GIST(#{col})"
end

# Directly imported with Postgres COPY CMD for now. So no projection

Loading…
Cancel
Save