瀏覽代碼

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
     }

Loading…
取消
儲存