Sha256: ebb4e58466bc370c53933d291912d33172a58e98ba7d3079fd23c7205eea0017

Contents?: true

Size: 872 Bytes

Versions: 9

Compression:

Stored size: 872 Bytes

Contents

require 'arjdbc/tasks/hsqldb_database_tasks'

module ArJdbc
  module Tasks
    class H2DatabaseTasks < HSQLDBDatabaseTasks
      
      protected
      
      # @override
      def do_drop_database(config)
        # ActiveRecord::JDBCError: org.h2.jdbc.JdbcSQLException: 
        # Database is already closed (to disable automatic closing at VM 
        # shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-170]: 
        # SHUTDOWN COMPACT
        # 
        # connection.shutdown
        connection.drop_database config['database']
      end
      
      # @override
      def delete_database_files(config)
        return unless db_base = database_base_name(config)
        db_files = [ "#{db_base}.h2.db", "#{db_base}.lock.db", "#{db_base}.trace.db" ]
        db_files.each { |file| File.delete(file) if File.exist?(file) }
      end
      
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
activerecord-jdbc-adapter-1.3.6 lib/arjdbc/tasks/h2_database_tasks.rb
activerecord-jdbc-adapter-1.3.5 lib/arjdbc/tasks/h2_database_tasks.rb
activerecord-jdbc-adapter-1.3.4 lib/arjdbc/tasks/h2_database_tasks.rb
activerecord-jdbc-adapter-1.3.3 lib/arjdbc/tasks/h2_database_tasks.rb
activerecord-jdbc-adapter-1.3.2 lib/arjdbc/tasks/h2_database_tasks.rb
activerecord-jdbc-adapter-1.3.1 lib/arjdbc/tasks/h2_database_tasks.rb
activerecord-jdbc-adapter-1.3.0 lib/arjdbc/tasks/h2_database_tasks.rb
activerecord-jdbc-adapter-1.3.0.rc1 lib/arjdbc/tasks/h2_database_tasks.rb
activerecord-jdbc-adapter-1.3.0.beta2 lib/arjdbc/tasks/h2_database_tasks.rb