gris 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/gris/version.rb +1 -1
- data/lib/tasks/db.rake +9 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69ff9441d488ecb7b5ed4adcb6fc4d43f4809152
|
4
|
+
data.tar.gz: f0dbf44a56fd4f4275c851db4e53faaabc5482dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac0ab18d4add6b2f6f73cfb974f7ef7c27c3991044ec0b8219fa7632c8344875ae483970e0b3a7e5386e6cdc9c376d421b4945221a2f42bb0045ecd36b58d429
|
7
|
+
data.tar.gz: cd84f2a8bad2684ff23959cb278eb4733c335a13b87bebf29ef93e290b8aa9f1330d65a8a99680e3592e7a344055ec519d02e5a9245924b0a5f9d2bab6a25d01
|
data/Gemfile.lock
CHANGED
data/lib/gris/version.rb
CHANGED
data/lib/tasks/db.rake
CHANGED
@@ -24,7 +24,15 @@ unless defined?(Rails)
|
|
24
24
|
admin_connection = db.merge(database: 'postgres',
|
25
25
|
schema_search_path: 'public')
|
26
26
|
ActiveRecord::Base.establish_connection(admin_connection)
|
27
|
-
|
27
|
+
begin
|
28
|
+
ActiveRecord::Base.connection.create_database(db['database'])
|
29
|
+
rescue ActiveRecord::StatementInvalid => e
|
30
|
+
if e.message =~ /DuplicateDatabase/
|
31
|
+
$stderr.puts "#{admin_connection['database']} already exists"
|
32
|
+
else
|
33
|
+
raise
|
34
|
+
end
|
35
|
+
end
|
28
36
|
end
|
29
37
|
|
30
38
|
desc 'Delete the database'
|