bootstrap-db 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +0 -1
- data/lib/bootstrap/db/tasks/bootstrap-db.rake +1 -1
- data/lib/bootstrap/db/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -65,7 +65,6 @@ Pass 'VERBOSE=true' if you'd like to see more information. For example:
|
|
65
65
|
|
66
66
|
|
67
67
|
## TODO (if we end up using this more)
|
68
|
-
|
69
68
|
* This has been quickly rebuilt from a ridiculously old project of mine (http://github.com/tommeier/bootstrap). This should be refactored into proper objects and expose classes as well as rake tasks. Fully tested.
|
70
69
|
* Proper mapping of parameter for dumping (eg. --username) to database config
|
71
70
|
* List required attributes for each database (like `host` and raise on missing)
|
@@ -75,7 +75,7 @@ namespace :bootstrap do
|
|
75
75
|
password_attrs = " -p#{settings["password"]}" if settings["password"]
|
76
76
|
display_and_execute("mysql -f -h #{settings["host"]} -u #{settings["username"]}#{password_attrs.to_s} #{settings["database"]} < #{config.dump_path}")
|
77
77
|
when :postgresql
|
78
|
-
default_sql_attrs = "--
|
78
|
+
default_sql_attrs = "--clean --single-transaction --format=c"
|
79
79
|
user_attribute = " --username=#{settings["username"]}" if settings['username']
|
80
80
|
display_and_execute("pg_restore #{default_sql_attrs} --host=#{settings["host"]} --port=#{settings["port"] || 5432} --dbname=#{settings["database"]}#{user_attribute} #{config.dump_path}")
|
81
81
|
else
|
data/lib/bootstrap/db/version.rb
CHANGED