Add phinx to the project.

This commit is contained in:
Dave Smith-Hayes 2024-06-23 22:04:34 -04:00
parent 84a2f2361c
commit 45639c8d9b
3 changed files with 1130 additions and 3 deletions

View File

@ -13,7 +13,8 @@
"slim/flash": "^0.4.0",
"odan/session": "^6.1",
"dotenv-org/phpdotenv-vault": "^0.2.4",
"react/react": "^1.4"
"react/react": "^1.4",
"robmorgan/phinx": "^0.16.1"
},
"require-dev": {
"phpunit/phpunit": "^11.1",
@ -33,6 +34,7 @@
}
},
"scripts": {
"test": "./vendor/bin/phpunit tests --display-warnings"
"test": "./vendor/bin/phpunit tests --display-warnings",
"phinx": "./vendor/bin/phinx"
}
}

1086
app/composer.lock generated

File diff suppressed because it is too large Load Diff

41
app/phinx.php Normal file
View File

@ -0,0 +1,41 @@
<?php
return
[
'paths' => [
'migrations' => '%%PHINX_CONFIG_DIR%%/db/migrations',
'seeds' => '%%PHINX_CONFIG_DIR%%/db/seeds'
],
'environments' => [
'default_migration_table' => 'phinxlog',
'default_environment' => 'development',
'production' => [
'adapter' => 'mysql',
'host' => 'localhost',
'name' => 'production_db',
'user' => 'root',
'pass' => '',
'port' => '3306',
'charset' => 'utf8',
],
'development' => [
'adapter' => 'mysql',
'host' => 'localhost',
'name' => 'development_db',
'user' => 'root',
'pass' => '',
'port' => '3306',
'charset' => 'utf8',
],
'testing' => [
'adapter' => 'mysql',
'host' => 'localhost',
'name' => 'testing_db',
'user' => 'root',
'pass' => '',
'port' => '3306',
'charset' => 'utf8',
]
],
'version_order' => 'creation'
];