From 8bb59329b6ac64cc8db86e8c6a48c06143daa84c Mon Sep 17 00:00:00 2001 From: Jesse Szwedko Date: Mon, 16 Jul 2018 14:46:36 -0700 Subject: [PATCH] Only create postgis extension if it isn't already enabled When using the mdillon/postgis docker image (also used by docker/data/Dockerfile), the extension is already enabled. --- db/migrations/001_enable_postgis_extension.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrations/001_enable_postgis_extension.rb b/db/migrations/001_enable_postgis_extension.rb index 8d19a89..b31334f 100644 --- a/db/migrations/001_enable_postgis_extension.rb +++ b/db/migrations/001_enable_postgis_extension.rb @@ -1,6 +1,6 @@ Sequel.migration do up do - execute %{ CREATE EXTENSION "postgis"; } + execute %{ CREATE EXTENSION IF NOT EXISTS "postgis"; } end down do