forked from gothinkster/slim-php-realworld-example-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphinx.php
42 lines (39 loc) · 1.36 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
require_once './vendor/autoload.php';
$settings = require './src/settings.php';
$app = new \Slim\App($settings);
$container = $app->getContainer();
$container->register(new \Conduit\Services\Database\EloquentServiceProvider());
$config = $container['settings']['database'];
return [
'paths' => [
'migrations' => 'database/migrations',
'seeds' => 'database/seeds',
],
'migration_base_class' => 'BaseMigration',
'templates' => [
'class' => 'TemplateGenerator',
],
'aliases' => [
'create' => 'CreateTableTemplateGenerator',
],
'environments' => [
'default_migration_table' => 'migrations',
'default_database' => 'development',
'development' => [
'name' => $config['database'],
'connection' => $container->get('db')->getConnection()->getPdo(),
],
'production' => [
'adapter' => $config['driver'],
'host' => $config['host'],
'name' => $config['database'],
'user' => $config['username'],
'pass' => $config['password'],
'port' => $config['port'],
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
],
],
];