4 def derby_connection(config)
5 config[:url] ||= "jdbc:derby:#{config[:database]};create=true"
6 config[:driver] ||= "org.apache.derby.jdbc.EmbeddedDriver"
7 conn = embedded_driver(config)
8 md = conn.jdbc_connection.meta_data
9 if md.database_major_version < 10 || (md.database_major_version == 10 && md.database_minor_version < 5)
10 raise ::ActiveRecord::ConnectionFailed, "Derby adapter requires Derby 10.5 or later"
15 alias_method :jdbcderby_connection, :derby_connection