Pārlūkot izejas kodu

check database types

develop
Robin Thoni 8 gadus atpakaļ
vecāks
revīzija
9ada53eb44
1 mainītis faili ar 13 papildinājumiem un 14 dzēšanām
  1. 13
    14
      src/Utils/Controller/LuticateApplication.php

+ 13
- 14
src/Utils/Controller/LuticateApplication.php Parādīt failu

@@ -95,20 +95,19 @@ class LuticateApplication implements MessageComponentInterface
95 95
         $capsule = new Capsule;
96 96
         foreach (static::getDatabases() as $database) {
97 97
 
98
-            $default = [
99
-                'name'      => 'mydb',
100
-                'driver'    => 'pgsql',
101
-                'host'      => '172.17.0.1',
102
-                'database'  => 'luticate2',
103
-                'username'  => 'dev',
104
-                'password'  => 'dev',
105
-                'charset'   => 'utf8',
106
-                'collation' => 'utf8_unicode_ci',
107
-                'prefix'    => ''
108
-            ];
109
-            $db = array_merge($default, $database);
110
-            if ($db['driver'] == 'pgsql' || $db['driver'] == 'mysql' ||
111
-                $db['driver'] == 'sqlite' || $db['driver'] == 'sqlsrv') {
98
+            if ($database['driver'] == 'pgsql' || $database['driver'] == 'mysql' ||
99
+                $database['driver'] == 'sqlite' || $database['driver'] == 'sqlsrv') {
100
+                $default = [
101
+                    'name'      => 'mydb',
102
+                    'host'      => '172.17.0.1',
103
+                    'database'  => 'luticate2',
104
+                    'username'  => 'dev',
105
+                    'password'  => 'dev',
106
+                    'charset'   => 'utf8',
107
+                    'collation' => 'utf8_unicode_ci',
108
+                    'prefix'    => ''
109
+                ];
110
+                $db = array_merge($default, $database);
112 111
                 $capsule->addConnection($db, $database['name']);
113 112
             }
114 113
         }

Notiek ielāde…
Atcelt
Saglabāt