Skip to content

Instantly share code, notes, and snippets.

@shengyou shengyou/phinx.php
Created Oct 4, 2016

Embed
What would you like to do?
setup phinx config using php instead of yaml file.
<?php
require __DIR__.'/bootstrap.php';
return [
'paths' => [
'migrations' => '%%PHINX_CONFIG_DIR%%/db/migrations',
'seeds' => '%%PHINX_CONFIG_DIR%%/db/seeds',
],
'environments' => [
'default_migration_table' => 'phinxlog',
'default_database' => 'development',
'development' => [
'adapter' => 'mysql',
'host' => DB_HOST,
'name' => DB_DATABASE,
'user' => DB_USERNAME,
'pass' => DB_PASSWORD,
'port' => DB_PORT,
'charset' => DB_CHARSET,
],
],
];
@nsbucky

This comment has been minimized.

Copy link

commented Nov 11, 2017

hey I assume in the bootstrap file you are loading .env file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.