From a54d4f530b992855bf9bfb154928b433b8c31fd2 Mon Sep 17 00:00:00 2001
From: Ismael Bejarano <ibejarano@manas.tech>
Date: Fri, 31 May 2024 10:40:06 -0300
Subject: [PATCH] Add postgis and pgrouting

---
 resources/planwise/plpgsql/isochrones.sql | 3 +++
 resources/planwise/plpgsql/patches.sql    | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/resources/planwise/plpgsql/isochrones.sql b/resources/planwise/plpgsql/isochrones.sql
index 79d530505..0c68616dc 100644
--- a/resources/planwise/plpgsql/isochrones.sql
+++ b/resources/planwise/plpgsql/isochrones.sql
@@ -1,3 +1,6 @@
+CREATE EXTENSION IF NOT EXISTS postgis;
+CREATE EXTENSION IF NOT EXISTS pgrouting;
+
 -- find closest node to a point
 CREATE OR REPLACE FUNCTION closest_node (original geometry(point, 4326))
 returns integer as $$
diff --git a/resources/planwise/plpgsql/patches.sql b/resources/planwise/plpgsql/patches.sql
index da46f639f..d77a5d4f2 100644
--- a/resources/planwise/plpgsql/patches.sql
+++ b/resources/planwise/plpgsql/patches.sql
@@ -1,3 +1,6 @@
+CREATE EXTENSION IF NOT EXISTS postgis;
+CREATE EXTENSION IF NOT EXISTS pgrouting;
+
 -- Copied from pgRouting and modified
 -- Original file: src/alpha_shape/sql/alpha_shape.sql
 -- Original copyright notice follows