Added the tests migrations files.

pull/316/head
Ruslan Baidan 2020-07-03 15:38:25 +02:00
parent 69894d9806
commit 37a2564579
No known key found for this signature in database
GPG Key ID: 4B7724C136BF1D89
4 changed files with 61 additions and 0 deletions

1
.gitignore vendored
View File

@ -6,6 +6,7 @@ nbproject
.project .project
.settings .settings
migrations migrations
!tests/migrations
*.sublime-* *.sublime-*
vagrant/.vagrant/ vagrant/.vagrant/
vagrant/*.log vagrant/*.log

2
public/info.php Normal file
View File

@ -0,0 +1,2 @@
<?php
phpinfo();

View File

@ -0,0 +1,29 @@
<?php
$config = require dirname(__DIR__) . '/config/local.php';
$connectionConf = [
'adapter' => 'mysql',
'host' => $config['doctrine']['connection']['orm_default']['params']['host'],
'name' => $config['doctrine']['connection']['orm_default']['params']['dbname'],
'user' => $config['doctrine']['connection']['orm_default']['params']['user'],
'pass' => $config['doctrine']['connection']['orm_default']['params']['password'],
'port' => $config['doctrine']['connection']['orm_default']['params']['port'],
'charset' => 'utf8',
];
if (isset($config['doctrine']['connection']['orm_default']['params']['options'][PDO::MYSQL_ATTR_SSL_KEY])) {
$connectionConf['ssl_key'] =
$config['doctrine']['connection']['orm_default']['params']['options'][PDO::MYSQL_ATTR_SSL_KEY];
}
return [
'paths' => [
'migrations' => dirname(__DIR__) . '/../module/Monarc/Core/migrations/db',
'seeds' => dirname(__DIR__) . '/../module/Monarc/Core/migrations/seeds',
],
'environments' => [
'default_migration_table' => 'phinxlog',
'default_database' => 'common',
'common' => $connectionConf,
],
];

View File

@ -0,0 +1,29 @@
<?php
$config = require dirname(__DIR__) . '/config/local.php';
$connectionConf = [
'adapter' => 'mysql',
'host' => $config['doctrine']['connection']['orm_cli']['params']['host'],
'name' => $config['doctrine']['connection']['orm_cli']['params']['dbname'],
'user' => $config['doctrine']['connection']['orm_cli']['params']['user'],
'pass' => $config['doctrine']['connection']['orm_cli']['params']['password'],
'port' => $config['doctrine']['connection']['orm_cli']['params']['port'],
'charset' => 'utf8',
];
if (isset($config['doctrine']['connection']['orm_cli']['params']['options'][PDO::MYSQL_ATTR_SSL_KEY])) {
$connectionConf['ssl_key'] =
$config['doctrine']['connection']['orm_cli']['params']['options'][PDO::MYSQL_ATTR_SSL_KEY];
}
return [
'paths' => [
'migrations' => dirname(__DIR__) . '/../module/Monarc/FrontOffice/migrations/db',
'seeds' => dirname(__DIR__) . '/../module/Monarc/FrontOffice/migrations/seeds',
],
'environments' => [
'default_migration_table' => 'phinxlog',
'default_database' => 'cli',
'cli' => $connectionConf,
],
];