浏览代码

check database types

develop
Robin Thoni 8 年前
父节点
当前提交
41200979d9
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5
    1
      src/Utils/Controller/LuticateApplication.php

+ 5
- 1
src/Utils/Controller/LuticateApplication.php 查看文件

@@ -101,7 +101,11 @@ class LuticateApplication implements MessageComponentInterface
101 101
                 'collation' => 'utf8_unicode_ci',
102 102
                 'prefix'    => ''
103 103
             ];
104
-            $capsule->addConnection(array_merge($default, $database), $database['name']);
104
+            $db = array_merge($default, $database);
105
+            if ($db['driver'] == 'pgsql' || $db['driver'] == 'mysql' ||
106
+                $db['driver'] == 'sqlite' || $db['driver'] == 'sqlsrv') {
107
+                $capsule->addConnection($db, $database['name']);
108
+            }
105 109
         }
106 110
         $capsule->setAsGlobal();
107 111
     }

正在加载...
取消
保存