-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmigrations.php
32 lines (28 loc) · 873 Bytes
/
migrations.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
<?php
declare(strict_types=1);
use Dotenv\Dotenv;
use Phalcon\Config;
const BASE_PATH = __DIR__;
const APP_PATH = BASE_PATH . '/app';
Dotenv::createImmutable(BASE_PATH)->safeLoad();
return new Config([
'database' => [
'adapter' => $_ENV['DB_ADAPTER'] ?? 'Mysql',
'host' => $_ENV['DB_HOST'] ?? '',
'username' => $_ENV['DB_USERNAME'] ?? '',
'password' => $_ENV['DB_PASSWORD'] ?? '',
'dbname' => $_ENV['DB_DBNAME'] ?? '',
'charset' => $_ENV['DB_CHARSET'] ?? 'utf8mb4',
],
'application' => [
'migrationsDir' => APP_PATH . '/migrations/',
'migrationsTsBased' => false,
'logInDb' => true,
'exportDataFromTables' => [
'companies',
'product_types',
'products',
'users'
]
]
]);