Class: ActiveRecord::Tasks::FirebirdDatabaseTasks
- Inherits:
-
Object
- Object
- ActiveRecord::Tasks::FirebirdDatabaseTasks
- Defined in:
- lib/active_record/tasks/firebird_database_tasks.rb
Overview
:nodoc:
Instance Method Summary collapse
- #charset ⇒ Object
- #create ⇒ Object
- #drop ⇒ Object
-
#initialize(configuration) ⇒ FirebirdDatabaseTasks
constructor
A new instance of FirebirdDatabaseTasks.
- #purge ⇒ Object
- #structure_dump(filename) ⇒ Object
- #structure_load(filename) ⇒ Object
Constructor Details
#initialize(configuration) ⇒ FirebirdDatabaseTasks
Returns a new instance of FirebirdDatabaseTasks.
6 7 8 9 |
# File 'lib/active_record/tasks/firebird_database_tasks.rb', line 6 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 |
Instance Method Details
#charset ⇒ Object
24 25 26 |
# File 'lib/active_record/tasks/firebird_database_tasks.rb', line 24 def charset $stderr.puts 'sorry, your database adapter is not supported yet, feel free to submit a patch' end |
#create ⇒ Object
11 12 13 |
# File 'lib/active_record/tasks/firebird_database_tasks.rb', line 11 def create $stderr.puts 'sorry, your database adapter is not supported yet, feel free to submit a patch' end |
#drop ⇒ Object
15 16 17 |
# File 'lib/active_record/tasks/firebird_database_tasks.rb', line 15 def drop $stderr.puts 'sorry, your database adapter is not supported yet, feel free to submit a patch' end |
#purge ⇒ Object
19 20 21 22 |
# File 'lib/active_record/tasks/firebird_database_tasks.rb', line 19 def purge establish_connection(:test) connection.recreate_database! end |
#structure_dump(filename) ⇒ Object
28 29 30 31 32 |
# File 'lib/active_record/tasks/firebird_database_tasks.rb', line 28 def structure_dump(filename) set_firebird_env(configuration) db_string = firebird_db_string(configuration) Kernel.system "isql -a #{db_string} > #{filename}" end |
#structure_load(filename) ⇒ Object
34 35 36 37 38 |
# File 'lib/active_record/tasks/firebird_database_tasks.rb', line 34 def structure_load(filename) set_firebird_env(configuration) db_string = firebird_db_string(configuration) Kernel.system "isql -i #{filename} #{db_string}" end |