-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathphinx.php
More file actions
31 lines (28 loc) · 781 Bytes
/
phinx.php
File metadata and controls
31 lines (28 loc) · 781 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
<?php
$host = getenv('MYSQL_HOST');
$port = getenv('MYSQL_PORT');
$database = getenv('MYSQL_DATABASE');
$password = getenv('MYSQL_ROOT_PASSWORD');
$options = [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
];
$pdo = new PDO(
"mysql:host=$host;port=$port;dbname=" .
$database,
'root',
$password,
$options
);
return [
'paths' => [
'migrations' => __DIR__ . '/app/databases/migrations',
'seeds' => __DIR__ . '/app/databases/seeds'
],
'environments' => [
'default_database' => 'orm',
'orm' => [
'name' => 'orm',
'connection' => $pdo
]
]
];