capistrano-postgresql 5.0.0 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 364a6abacd3ed6062160d63783197e096265e5e2c4bba1b2f313c6531425befa
|
4
|
+
data.tar.gz: 90ecfedb1b53b252bbf04744fa24a508cc3337704497016f06a12cd11fdf9f1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1a9e6735070c862d871928394c6c36599f8730ce61f9649a4d32192c529473d73ff5bb09bfef2869f0f25c03dd97a15bdbdfbef81bbbefee317c038e7817fef
|
7
|
+
data.tar.gz: e5dd8a20ba9312352d8174e8d83b0e8ba361b336e5abfb4c11fe60bdf7c614ecfb42771a34ab9b9d78de31b595969b97a4d96088d51a9f247be918cb9a622a79
|
data/CHANGELOG.md
CHANGED
@@ -5,7 +5,7 @@ module Capistrano
|
|
5
5
|
module HelperMethods
|
6
6
|
|
7
7
|
def extension_exists?(extension)
|
8
|
-
psql 'test', fetch(:
|
8
|
+
psql 'test', fetch(:pg_database), '-tAc', %Q{"SELECT 1 FROM pg_extension WHERE extname='#{extension}';" | grep -q 1}
|
9
9
|
end
|
10
10
|
|
11
11
|
def remove_extensions
|
@@ -14,7 +14,7 @@ module Capistrano
|
|
14
14
|
# remove in reverse order if extension is present
|
15
15
|
Array( fetch(:pg_extensions) ).reverse.each do |ext|
|
16
16
|
next if [nil, false, ""].include?(ext)
|
17
|
-
psql 'execute', fetch(:
|
17
|
+
psql 'execute', fetch(:pg_database), '-c', %Q{"DROP EXTENSION IF EXISTS #{ext};"} if extension_exists?(ext)
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -76,7 +76,7 @@ namespace :postgresql do
|
|
76
76
|
if Array( fetch(:pg_extensions) ).any?
|
77
77
|
Array( fetch(:pg_extensions) ).each do |ext|
|
78
78
|
next if [nil, false, ''].include?(ext)
|
79
|
-
psql 'execute', fetch(:
|
79
|
+
psql 'execute', fetch(:pg_database), '-c', %Q{"CREATE EXTENSION IF NOT EXISTS #{ext};"}unless extension_exists?(ext)
|
80
80
|
end
|
81
81
|
end
|
82
82
|
end
|