diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-06-25 16:56:39 -0700 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-06-25 16:56:39 -0700 |
commit | 370e1ad3f1f30f955bd781f0ecd113409b8ccf8f (patch) | |
tree | 0b1bc676ad39ecd654a3af69a4ae6341f166a44d /activerecord/lib/active_record/tasks/firebird_database_tasks.rb | |
parent | 32dd37b65a07286d046ea529b28df86446498a54 (diff) | |
parent | 6649140120a5a6456d7fc63841d90d19a78b3b8c (diff) | |
download | rails-370e1ad3f1f30f955bd781f0ecd113409b8ccf8f.tar.gz rails-370e1ad3f1f30f955bd781f0ecd113409b8ccf8f.tar.bz2 rails-370e1ad3f1f30f955bd781f0ecd113409b8ccf8f.zip |
Merge pull request #10853 from kennyj/deprecated-database_tasks
Remove Oracle / Sqlserver / Firebird database tasks were deprecated since 4.0.
Diffstat (limited to 'activerecord/lib/active_record/tasks/firebird_database_tasks.rb')
-rw-r--r-- | activerecord/lib/active_record/tasks/firebird_database_tasks.rb | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/activerecord/lib/active_record/tasks/firebird_database_tasks.rb b/activerecord/lib/active_record/tasks/firebird_database_tasks.rb deleted file mode 100644 index 98014a38ea..0000000000 --- a/activerecord/lib/active_record/tasks/firebird_database_tasks.rb +++ /dev/null @@ -1,56 +0,0 @@ -module ActiveRecord - module Tasks # :nodoc: - class FirebirdDatabaseTasks # :nodoc: - delegate :connection, :establish_connection, to: ActiveRecord::Base - - def initialize(configuration) - ActiveSupport::Deprecation.warn "This database tasks were deprecated, because this tasks should be served by the 3rd party adapter." - @configuration = configuration - end - - def create - $stderr.puts 'sorry, your database adapter is not supported yet, feel free to submit a patch' - end - - def drop - $stderr.puts 'sorry, your database adapter is not supported yet, feel free to submit a patch' - end - - def purge - establish_connection(:test) - connection.recreate_database! - end - - def charset - $stderr.puts 'sorry, your database adapter is not supported yet, feel free to submit a patch' - end - - def structure_dump(filename) - set_firebird_env(configuration) - db_string = firebird_db_string(configuration) - Kernel.system "isql -a #{db_string} > #{filename}" - end - - def structure_load(filename) - set_firebird_env(configuration) - db_string = firebird_db_string(configuration) - Kernel.system "isql -i #{filename} #{db_string}" - end - - private - - 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 - - def configuration - @configuration - end - end - end -end |