diff options
author | kennyj <kennyj@gmail.com> | 2012-06-26 03:04:21 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2012-06-26 04:06:45 +0900 |
commit | 04002db95c0cd6bafb2358d29998a89c7de46873 (patch) | |
tree | 11092021b9412c8f8d3e62b9d92cfbdb0511c94a /activerecord/lib/active_record/railties | |
parent | 09bb777cb17cd2cee10698346edb9bc0292a0dbe (diff) | |
download | rails-04002db95c0cd6bafb2358d29998a89c7de46873.tar.gz rails-04002db95c0cd6bafb2358d29998a89c7de46873.tar.bz2 rails-04002db95c0cd6bafb2358d29998a89c7de46873.zip |
Move to db:structure namespace, because these methods are global.
Diffstat (limited to 'activerecord/lib/active_record/railties')
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index d31ab054e6..1dcd0a5a32 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -270,6 +270,15 @@ db_namespace = namespace :db do end namespace :structure do + def set_firebird_env(config) + ENV['ISC_USER'] = config['username'].to_s if config['username'] + ENV['ISC_PASSWORD'] = config['password'].to_s if config['password'] + end + + def firebird_db_string(config) + FireRuby::Database.db_string_for(config.symbolize_keys) + end + desc 'Dump the database structure to db/structure.sql. Specify another file with DB_STRUCTURE=db/my_structure.sql' task :dump => [:environment, :load_config] do abcs = ActiveRecord::Base.configurations @@ -450,11 +459,3 @@ end task 'test:prepare' => 'db:test:prepare' -def set_firebird_env(config) - ENV['ISC_USER'] = config['username'].to_s if config['username'] - ENV['ISC_PASSWORD'] = config['password'].to_s if config['password'] -end - -def firebird_db_string(config) - FireRuby::Database.db_string_for(config.symbolize_keys) -end |