diff --git a/.travis/configure.sh b/.travis/configure.sh index 17ed697b7..be3bef6da 100755 --- a/.travis/configure.sh +++ b/.travis/configure.sh @@ -57,13 +57,13 @@ echo " array( - 'datasource' => 'Database/Mysql', + 'datasource' => 'Database/MysqlCms', 'host' => '${TEST_MYSQL_SERVICE_HOST}', 'login' => '${TEST_DATABASE_USER}', 'password' => '${TEST_DATABASE_PASSWORD}' ), 'Pgsql' => array( - 'datasource' => 'Database/Postgres', + 'datasource' => 'Database/PostgresCms', 'host' => '${TEST_POSTGRES_SERVICE_HOST}', 'login' => '${TEST_DATABASE_USER}', 'database' => 'cakephp_test', @@ -75,7 +75,7 @@ echo " array( - 'datasource' => 'Database/Sqlite', + 'datasource' => 'Database/SqliteCms', 'database' => array( 'default' => ':memory:', 'test' => ':memory:', diff --git a/app/Config/boot_profile.cms.php b/app/Config/boot_profile.cms.php index 74fa32c2e..a059a8c05 100644 --- a/app/Config/boot_profile.cms.php +++ b/app/Config/boot_profile.cms.php @@ -14,8 +14,7 @@ and is even quicker than a semantically equal self-defined autoload function like this one */ App::build(array( - 'Cms' => array(WWW_ROOT . 'php_cms' . DS . 'e13' . DS . 'include' . DS), - 'Model/Datasource/Database' => array(APP . 'Model' . DS . 'Datasource' . DS . 'Database') + 'Cms' => array(WWW_ROOT . 'php_cms' . DS . 'e13' . DS . 'include' . DS) ), App::REGISTER); /** * Load DebugKit plugin diff --git a/app/Config/database.cms.php b/app/Config/database.cms.php index 63dbcdc00..2220359a2 100644 --- a/app/Config/database.cms.php +++ b/app/Config/database.cms.php @@ -69,7 +69,7 @@ class DATABASE_CONFIG { public $default = array( # this is an extended Mysql database (providing blob-binary storage) - 'datasource' => 'Database/Mysql_cms', + 'datasource' => 'Database/MysqlCms', 'persistent' => false, //'host' => 'localhost', 'host' => '127.0.0.1', @@ -81,7 +81,7 @@ class DATABASE_CONFIG { 'encoding' => 'utf8', ); public $test = array( - 'datasource' => 'Database/Mysql_cms', + 'datasource' => 'Database/MysqlCms', 'persistent' => false, //'host' => 'localhost', 'host' => '127.0.0.1', diff --git a/app/Model/Datasource/Database/Mysql_cms.php b/app/Model/Datasource/Database/MysqlCms.php similarity index 83% rename from app/Model/Datasource/Database/Mysql_cms.php rename to app/Model/Datasource/Database/MysqlCms.php index fdf4937df..5933d5c60 100644 --- a/app/Model/Datasource/Database/Mysql_cms.php +++ b/app/Model/Datasource/Database/MysqlCms.php @@ -1,11 +1,10 @@ columns['mediumbinary'] = array('name' => 'mediumblob'); } diff --git a/app/Model/Datasource/Database/PostgresCms.php b/app/Model/Datasource/Database/PostgresCms.php new file mode 100644 index 000000000..f81c4ca85 --- /dev/null +++ b/app/Model/Datasource/Database/PostgresCms.php @@ -0,0 +1,11 @@ +columns['mediumbinary'] = array('name' => 'bytea'); + } +} +?> diff --git a/app/Model/Datasource/Database/Postgres_cms.php b/app/Model/Datasource/Database/Postgres_cms.php deleted file mode 100644 index b9b82b70a..000000000 --- a/app/Model/Datasource/Database/Postgres_cms.php +++ /dev/null @@ -1,12 +0,0 @@ -columns['mediumbinary'] = array('name' => 'bytea'); - } -} -?> diff --git a/app/Model/Datasource/Database/Sqlite_cms.php b/app/Model/Datasource/Database/SqliteCms.php similarity index 82% rename from app/Model/Datasource/Database/Sqlite_cms.php rename to app/Model/Datasource/Database/SqliteCms.php index 855e94241..0e459059f 100644 --- a/app/Model/Datasource/Database/Sqlite_cms.php +++ b/app/Model/Datasource/Database/SqliteCms.php @@ -1,11 +1,10 @@ columns['mediumbinary'] = array('name' => 'bytea'); } diff --git a/migrate-database.sh b/migrate-database.sh index c70a89497..622681cda 100755 --- a/migrate-database.sh +++ b/migrate-database.sh @@ -1,19 +1,4 @@ #!/bin/bash -# HOWTO: connect to the database, a mysql56+ server (must match remote server version) -# must be reachable locally. If it's the 1st time you use this connection, -# Configure it by logging in with shell:$ mysql -u root -# Then execute this SQL statements : create database DATABASE_NAME; # NO QUOTES '' -# use database DATABASE_NAME; -# create user 'DATABASE_USER'@'localhost' -# identified by 'DATABASE_PASSWORD'; -# The values of CakePHP DB VARIABLES available at app/Config/database.php. -# Don't forget to grant all privileges to 'DATABASE_USER'@'localhost' e.g.: -# GRANT ALL ON phpcms.* to 'test'@'localhost' identified by 'mypassword'; -#; -#; Pass as arguments values "[-y|n|u]" to override user prompt, if you're in "nutshell". -#; y fixup socket -#; u fixup socket and update schema (must connect successsfully) -#; set -e source ./Scripts/lib/shell_prompt.sh source ./Scripts/lib/parsing.sh diff --git a/test-cake.sh b/test-cake.sh index 8a08f2716..7cbda220e 100755 --- a/test-cake.sh +++ b/test-cake.sh @@ -11,7 +11,7 @@ while [[ "$#" > 0 ]]; do case $1 in export TRAVIS_PHP_VERSION=$(php -v | grep -E "[5-7]\.\\d+\.\\d+" | cut -d " " -f 2 | cut -c 1-3 ) # remote servers CI don't need (-i) identities but the socket: use configure.sh --mig-database --openshift - notice="\n${cyan}Notice:${nc}The test script is about to modify the root and test users password to, resp. ${orange}'proot'${nc} and ${cyan}'ptest'${nc}\n" + notice="\n${cyan}Notice:${nc}The test script is about to modify the root and test users password into resp. ${orange}'proot'${nc} and ${cyan}'ptest'${nc}\n" echo -e $notice source ./configure.sh "--mig-database" "-p" "-t" "-i" "-p=proot" "-t=ptest" echo -e $notice