forked from phalcon/vokuro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphinx.php
42 lines (37 loc) · 1.15 KB
/
phinx.php
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
42
<?php
use Dotenv\Dotenv;
(Dotenv::createImmutable(__DIR__))->load();
$adapter = strtolower($_ENV['DB_ADAPTER'] ?? 'mysql');
$host = $_ENV['DB_HOST'] ?? 'localhost';
$user = $_ENV['DB_USERNAME'] ?? 'root';
$pass = $_ENV['DB_PASSWORD'] ?? '';
$port = $_ENV['DB_PORT'] ?? 3306;
$name = $_ENV['DB_NAME'] ?? 'phalcon_vokuro';
if ('sqlite' === $adapter) {
$name = '%%PHINX_CONFIG_DIR%%/db/' . $name;
}
return [
'paths' => [
'migrations' => [
'Vokuro\\Migrations' => '%%PHINX_CONFIG_DIR%%/db/migrations'
],
'seeds' => [
'Vokuro\\Seeds' => '%%PHINX_CONFIG_DIR%%/db/seeds',
],
],
'environments' => [
'default_migration_table' => 'phinxlog',
'default_database' => 'development',
'development' => [
'adapter' => $adapter,
'host' => $host,
'name' => $name,
'user' => $user,
'pass' => $pass,
'port' => $port,
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
],
],
'version_order' => 'creation'
];