public
Description: All the extra stuff you could want for the Mack Framework.
Homepage: http://www.mackframework.com
Clone URL: git://github.com/markbates/mack-more.git
Added an establish_connection before structure_dump [#67]
markbates (author)
Fri Aug 08 18:22:07 -0700 2008
commit  40f381a79eaee9a5a88a3d8c3101938175d2bef9
tree    8a5b1c9dcdb384ba043a7ffe24ad323b3602551c
parent  8e58e51b274204ac4246d608e6e51e9e0bbfb18c
...
29
30
31
 
32
33
34
...
29
30
31
32
33
34
35
0
@@ -29,6 +29,7 @@ module Mack
0
     end
0
     
0
     def self.structure_dump(env = Mack.env, repis = :default)
0
+      Mack::Database.establish_connection(env)
0
       adapter = repository(repis).adapter
0
       uri = adapter.uri
0
       structure = ""
...
4
5
6
 
 
7
8
9
...
4
5
6
7
8
9
10
11
0
@@ -4,6 +4,8 @@ namespace :test do
0
     unless ENV["MACK_TEST_ENV_SETUP?"] == "true"
0
       ENV["MACK_ENV"] = "test"
0
       Rake::Task["db:recreate"].invoke
0
+      # Rake::Task["db:structure:dump"].invoke
0
+      Mack::Database.structure_dump("development", :default)
0
       Rake::Task["db:migrate"].invoke
0
       ENV["MACK_TEST_ENV_SETUP?"] = "true"
0
     end

Comments