File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -100,13 +100,12 @@ namespace :db do
100100 unless search_path . blank?
101101 search_path = search_path . split ( "," ) . map { |part | "--schema=#{ Shellwords . escape ( part . strip ) } " } . join ( " " )
102102 end
103- `pg_dump -i -s -x -O -f #{ Shellwords . escape ( filename ) } #{ search_path } #{ Shellwords . escape ( config [ 'database' ] ) } `
104- raise 'Error dumping database' if $?. exitstatus == 1
103+ sh "pg_dump -i -s -x -O -f #{ Shellwords . escape ( filename ) } #{ search_path } #{ Shellwords . escape ( config [ 'database' ] ) } "
105104
106105 File . open ( filename , 'a' ) { |f | f << "SET search_path TO #{ ActiveRecord ::Base . connection . schema_search_path } ;\n \n " }
107106 when /sqlite/
108107 dbfile = config [ 'database' ]
109- ` sqlite3 #{ dbfile } .schema > #{ filename } `
108+ sh " sqlite3 #{ dbfile } .schema > #{ filename } "
110109 else
111110 ActiveRecord ::Base . establish_connection ( config )
112111 ArJdbc ::Tasks . structure_dump ( config , filename )
@@ -115,10 +114,11 @@ namespace :db do
115114 if ActiveRecord ::Base . connection . supports_migrations?
116115 File . open ( filename , 'a' ) { |f | f << ActiveRecord ::Base . connection . dump_schema_information }
117116 end
117+
118118 end
119119
120120 redefine_task :load do
121- config = current_config
121+ config = current_config
122122 filename = structure_sql
123123
124124 case config [ 'adapter' ]
You can’t perform that action at this time.
0 commit comments