phinx.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. declare(strict_types=1);
  3. include './config/.config.php';
  4. return [
  5. 'paths' => [
  6. 'migrations' => '%%PHINX_CONFIG_DIR%%/db/migrations',
  7. 'seeds' => '%%PHINX_CONFIG_DIR%%/db/seeds',
  8. ],
  9. 'environments' => [
  10. 'default_migration_table' => 'phinxlog',
  11. 'default_environment' => 'production',
  12. 'production' => [
  13. 'adapter' => 'mysql',
  14. 'host' => $_ENV['db_host'],
  15. 'name' => $_ENV['db_database'],
  16. 'user' => $_ENV['db_username'],
  17. 'pass' => $_ENV['db_password'],
  18. 'port' => '3306',
  19. 'charset' => $_ENV['db_charset'],
  20. ],
  21. 'development' => [
  22. 'adapter' => 'mysql',
  23. 'host' => 'localhost',
  24. 'name' => 'development_db',
  25. 'user' => 'root',
  26. 'pass' => '',
  27. 'port' => '3306',
  28. 'charset' => 'utf8',
  29. ],
  30. 'testing' => [
  31. 'adapter' => 'mysql',
  32. 'host' => 'localhost',
  33. 'name' => 'testing_db',
  34. 'user' => 'root',
  35. 'pass' => '',
  36. 'port' => '3306',
  37. 'charset' => 'utf8',
  38. ],
  39. ],
  40. 'version_order' => 'creation',
  41. ];