Migraciones

This commit is contained in:
2021-03-16 00:43:14 -03:00
parent bfaf2b354e
commit cd6a949e23
7 changed files with 682 additions and 2 deletions

View File

@ -9,7 +9,8 @@
"php-di/slim-bridge": "^3.1",
"provm/models": "dev-master",
"provm/controller": "dev-master",
"vlucas/phpdotenv": "^5.3"
"vlucas/phpdotenv": "^5.3",
"nesbot/carbon": "^2.46"
},
"license": "MIT",
"authors": [
@ -19,7 +20,9 @@
}
],
"require-dev": {
"phpunit/phpunit": "^8.5"
"phpunit/phpunit": "^8.5",
"robmorgan/phinx": "^0.12.5",
"odan/phinx-migrations-generator": "^5.4"
},
"autoload": {
"psr-4": {

42
app/phinx.php Normal file
View File

@ -0,0 +1,42 @@
<?php
return
[
'paths' => [
'migrations' => '%%PHINX_CONFIG_DIR%%/../db/migrations',
'seeds' => '%%PHINX_CONFIG_DIR%%/../db/seeds'
],
'schema_file' => '%%PHINX_CONFIG_DIR%%/../db/schema.php',
'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' => 'money_dev',
'user' => 'money',
'pass' => 'money_pass',
'port' => '3307',
'charset' => 'utf8',
],
'testing' => [
'adapter' => 'mysql',
'host' => 'localhost',
'name' => 'testing_db',
'user' => 'root',
'pass' => '',
'port' => '3306',
'charset' => 'utf8',
]
],
'version_order' => 'creation'
];