Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions nix/backup_and_restore.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ let
create schema public;
CREATE EXTENSION cube WITH SCHEMA public;
CREATE EXTENSION earthdistance WITH SCHEMA public;
ALTER FUNCTION ll_to_earth SET search_path = public;
ALTER FUNCTION earth_box SET search_path = public;
.

# Restore
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
defmodule TeslaMate.Repo.Migrations.SetSearchPathForEarthdistanceFunctions do
use Ecto.Migration

def up do
execute("ALTER FUNCTION ll_to_earth SET search_path = public")
execute("ALTER FUNCTION earth_box SET search_path = public")
end

def down do
:ok
end
end
2 changes: 2 additions & 0 deletions website/docs/installation/unsupported/unraid.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ DROP SCHEMA private CASCADE;
CREATE SCHEMA public;
CREATE EXTENSION cube WITH SCHEMA public;
CREATE EXTENSION earthdistance WITH SCHEMA public;
ALTER FUNCTION ll_to_earth SET search_path = public;
ALTER FUNCTION earth_box SET search_path = public;
SQL

if [ $? -ne 0 ]; then
Expand Down
2 changes: 2 additions & 0 deletions website/docs/maintenance/backup_restore.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ DROP SCHEMA private CASCADE;
CREATE SCHEMA public;
CREATE EXTENSION cube WITH SCHEMA public;
CREATE EXTENSION earthdistance WITH SCHEMA public;
ALTER FUNCTION ll_to_earth SET search_path = public;
ALTER FUNCTION earth_box SET search_path = public;
.

# Restore
Expand Down
Loading