Created
October 4, 2016 15:56
-
-
Save shengyou/bafbb56b858b79b76386cad00a277a00 to your computer and use it in GitHub Desktop.
setup phinx config using php instead of yaml file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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, | |
], | |
], | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hey I assume in the bootstrap file you are loading .env file?