Bug 11389: reenable Pg as a DB scheme that Koha can connect to
[koha_fer] / Koha / Database.pm
index c10a61a..12758bf 100644 (file)
@@ -32,8 +32,6 @@ Koha::Database
 
 =cut
 
-$ENV{'DBIC_DONT_VALIDATE_RELS'} = 1; # FIXME once the DBIx schema has its schema adjusted we should remove this
-
 use Modern::Perl;
 use Carp;
 use C4::Context;
@@ -47,14 +45,8 @@ __PACKAGE__->mk_accessors(qw( ));
 # database connection from the data given in the current context, and
 # returns it.
 sub _new_schema {
-    my $db_driver;
     my $context = C4::Context->new();
-    if ( $context->config("db_scheme") ) {
-        $db_driver = $context->db_scheme2dbi( $context->config("db_scheme") );
-    }
-    else {
-        $db_driver = "mysql";
-    }
+    my $db_driver = C4::Context::db_scheme2dbi($context->config("db_scheme"));
 
     my $db_name   = $context->config("database");
     my $db_host   = $context->config("hostname");