Integrated Phinx DB migrations. Requires running composer install

This commit is contained in:
Frank Schubert
2023-09-06 09:30:33 +02:00
parent 83fce677db
commit 849e6581ec
6 changed files with 213 additions and 1 deletions

38
config/phinx.php Normal file
View File

@@ -0,0 +1,38 @@
<?php
require_once(realpath(dirname(__FILE__)."/../config/config.php"));
return
[
'paths' => [
'migrations' => BASEDIR."/db/migrations",
'seeds' => BASEDIR."/db/seeds"
],
'environments' => [
'default_migration_table' => 'phinxlog',
'default_environment' => 'thetool',
'thetool' => [
'adapter' => 'mysql',
'host' => FRONKDB_DBHOST,
'name' => FRONKDB_DBNAME,
'user' => FRONKDB_DBUSER,
'pass' => FRONKDB_DBPASS,
'port' => '3306',
'charset' => 'utf8',
],
'addressdb' => [
'adapter' => 'mysql',
'host' => ADDRESSDB_DBHOST,
'name' => ADDRESSDB_DBNAME,
'user' => ADDRESSDB_DBUSER,
'pass' => ADDRESSDB_DBPASS,
'port' => '3306',
'charset' => 'utf8',
],
],
'version_order' => 'creation',
'templates' => [
"file" => BASEDIR."/db/template/migrate.up_down.template"
]
];