Skip to content
This repository
Browse code

Move to db:structure namespace, because these methods are global.

  • Loading branch information...
commit 04002db95c0cd6bafb2358d29998a89c7de46873 1 parent 09bb777
Toshinori Kajihara authored June 26, 2012
17  activerecord/lib/active_record/railties/databases.rake
@@ -270,6 +270,15 @@ db_namespace = namespace :db do
270 270
   end
271 271
 
272 272
   namespace :structure do
  273
+    def set_firebird_env(config)
  274
+      ENV['ISC_USER']     = config['username'].to_s if config['username']
  275
+      ENV['ISC_PASSWORD'] = config['password'].to_s if config['password']
  276
+    end
  277
+    
  278
+    def firebird_db_string(config)
  279
+      FireRuby::Database.db_string_for(config.symbolize_keys)
  280
+    end
  281
+
273 282
     desc 'Dump the database structure to db/structure.sql. Specify another file with DB_STRUCTURE=db/my_structure.sql'
274 283
     task :dump => [:environment, :load_config] do
275 284
       abcs = ActiveRecord::Base.configurations
@@ -450,11 +459,3 @@ end
450 459
 
451 460
 task 'test:prepare' => 'db:test:prepare'
452 461
 
453  
-def set_firebird_env(config)
454  
-  ENV['ISC_USER']     = config['username'].to_s if config['username']
455  
-  ENV['ISC_PASSWORD'] = config['password'].to_s if config['password']
456  
-end
457  
-
458  
-def firebird_db_string(config)
459  
-  FireRuby::Database.db_string_for(config.symbolize_keys)
460  
-end

0 notes on commit 04002db

Please sign in to comment.
Something went wrong with that request. Please try again.