-
-
Save moritz-h/579f43c8af02f3644115d91185b73f6e to your computer and use it in GitHub Desktop.
phinx bug
This file contains 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 | |
use Phinx\Migration\AbstractMigration; | |
class InitDb extends AbstractMigration | |
{ | |
public function up() | |
{ | |
// do nothing | |
} | |
public function down() | |
{ | |
// do nothing | |
} | |
} |
This file contains 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
{ | |
"require": { | |
"robmorgan/phinx": "v0.6.4" | |
} | |
} |
This file contains 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__.'/vendor/autoload.php'; | |
$app = new \Phinx\Console\PhinxApplication(); | |
$wrap = new \Phinx\Wrapper\TextWrapper($app); | |
$wrap->setOption('environment', 'db'); | |
$wrap->setOption('configuration', 'phinx.php'); | |
$wrap->setOption('parser', 'php'); | |
echo $wrap->getRollback(null, 0); | |
echo $wrap->getMigrate(); | |
echo $wrap->getRollback(null, 0); |
This file contains 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 | |
return [ | |
'paths' => [ | |
'migrations' => '%%PHINX_CONFIG_DIR%%/migrations', | |
], | |
'environments' => [ | |
'default_migration_table' => 'phinxlog', | |
'default_database' => 'db', | |
'db' => [ | |
'adapter' => 'mysql', | |
'host' => '127.0.0.1', | |
'name' => 'test', | |
'user' => 'test', | |
'pass' => 'test', | |
'port' => '3306', | |
'charset' => 'utf8mb4', | |
'table_prefix' => '', | |
], | |
], | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment