-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathphinx.php
More file actions
45 lines (41 loc) · 1.35 KB
/
phinx.php
File metadata and controls
45 lines (41 loc) · 1.35 KB
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
43
44
45
<?php
require __DIR__ . '/vendor/autoload.php';
$dotenv = Dotenv\Dotenv::create(__DIR__ . '/');
$dotenv->load();
$capsule = new \Illuminate\Database\Capsule\Manager;
$capsule->addConnection([
'driver' => getenv('DB_DRIVER'),
'host' => getenv('DB_HOST'),
'port' => getenv('DB_PORT'),
'database' => getenv('DB_DATABASE'),
'username' => getenv('DB_USERNAME'),
'password' => getenv('DB_PASSWORD'),
'charset' => getenv('DB_CHARSET'),
'collation' => getenv('DB_COLLATION'),
'prefix' => getenv('DB_PREFIX')
]);
$capsule->setAsGlobal();
$capsule->bootEloquent();
return [
'paths' => [
'migrations' => __DIR__ . '/database/migrations',
'seeds' => __DIR__ . '/database/seeds'
],
'migration_base_class' => '\StudioAtual\Database\Migrations\MigrationBase',
'templates' => [
'file' => __DIR__ . '/app/Database/Migrations/template'
],
'environments' => [
'default_migration_table' => 'migrations',
'default_database' => 'development',
'development' => [
'adapter' => getenv('DB_DRIVER'),
'host' => getenv('DB_HOST'),
'name' => getenv('DB_DATABASE'),
'user' => getenv('DB_USERNAME'),
'pass' => getenv('DB_PASSWORD'),
'port' => getenv('DB_PORT'),
'charset' => getenv('DB_CHARSET')
],
]
];