-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphinx.php
More file actions
26 lines (24 loc) · 803 Bytes
/
phinx.php
File metadata and controls
26 lines (24 loc) · 803 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
<?php
$dotenv = \Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv->load();
return
[
'paths' => [
'migrations' => __DIR__ . '/Application/Database/migrations',
'seeds' => __DIR__ . '/Application/Database/seeds',
],
'environments' => [
'default_migration_table' => 'phinxlog',
'default_environment' => 'env',
'env' => [
'adapter' => 'mysql',
'host' => $_ENV['DB_HOST'] === 'host.docker.internal' ? '127.0.0.1' : $_ENV['DB_HOST'],
'name' => $_ENV['DB_NAME'],
'user' => $_ENV['DB_USER'],
'pass' => $_ENV['DB_PASSWORD'],
'port' => '3306',
'charset' => isset($_ENV['DB_CHARSET']) ? $_ENV['DB_CHARSET'] : 'utf8',
],
],
'version_order' => 'creation',
];