-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathphinx-adapter.php
More file actions
41 lines (33 loc) · 962 Bytes
/
phinx-adapter.php
File metadata and controls
41 lines (33 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/**
* Icinga Editor - Phinx Adapter
*
* @author Vitex <vitex@hippy.cz>
* @copyright 2018 Vitex@hippy.cz (G)
*/
namespace Icinga\Editor;
include_once './vendor/autoload.php';
\Ease\Shared::instanced()->loadConfig('config.json', true);
$engine = new \Ease\SQL\Engine(null);
$cfg = [
'paths' => [
'migrations' => ['db/migrations'],
'seeds' => ['db/seeds']
],
'environments' =>
[
'default_database' => 'development',
'development' => [
'adapter' => \Ease\Shared::instanced()->getConfigValue('DB_CONNECTION'),
'name' => $engine->database,
'connection' => $engine->getPdo()
],
'default_database' => 'production',
'production' => [
'adapter' => \Ease\Shared::instanced()->getConfigValue('DB_CONNECTION'),
'name' => $engine->database,
'connection' => $engine->getPdo()
],
]
];
return $cfg;