From b9b6c1bd20a38be6b663a61b269b702067edec9a Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 12 Mar 2020 18:02:55 +0100 Subject: [PATCH] remove db prefix --- Config/phpstan.neon | 17 +++++++++++++++++ Config/reportLang.php | 2 -- minimumSetup.php | 19 ++++++------------- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/Config/phpstan.neon b/Config/phpstan.neon index 36fc0eb..8afbe5b 100755 --- a/Config/phpstan.neon +++ b/Config/phpstan.neon @@ -48,3 +48,20 @@ parameters: - message: '#Binary operation "\-" between string and int results in an error#' path: *Matrix/Matrix.php + +SELECT + `a`.`organization_unit_id` as id_3, + `b`.`organization_unit_id` as id_2, + `c`.`organization_unit_id` as id_1 + +FROM `oms_organization_unit` as a + +LEFT JOIN `oms_organization_unit` as b + ON + `a`.`organization_unit_parent` = `b`.`organization_unit_id` + +LEFT JOIN `oms_organization_unit` as c + ON + `b`.`organization_unit_parent` = `c`.`organization_unit_id` + +WHERE `a`.`organization_unit_id` = 1; \ No newline at end of file diff --git a/Config/reportLang.php b/Config/reportLang.php index d61e5bd..da811e6 100644 --- a/Config/reportLang.php +++ b/Config/reportLang.php @@ -610,7 +610,6 @@ return [ 'phpOMS\tests\DataStorage\Database\Query\Grammar\GrammarTest' => ['description' => 'Basic sql query grammar', 'type' => 'framework'], 'phpOMS\tests\DataStorage\Database\Query\Grammar\GrammarTest:testDefault' => ['description' => 'The grammar has the expected default values after initialization', 'type' => 'framework'], - 'phpOMS\tests\DataStorage\Database\Query\Grammar\GrammarTest:testPrefixInputOutput' => ['description' => 'The grammar can define a default table prefix and return this value', 'type' => 'framework'], 'phpOMS\tests\DataStorage\Database\Query\Grammar\MysqlGrammarTest' => ['description' => 'Mysql sql query grammar', 'type' => 'framework'], 'phpOMS\tests\DataStorage\Database\Query\Grammar\MysqlGrammarTest:testDefault' => ['description' => 'The grammar has the expected default values after initialization', 'type' => 'framework'], @@ -626,7 +625,6 @@ return [ 'phpOMS\tests\DataStorage\Database\Schema\Grammar\GrammarTest' => ['description' => 'Basic sql query grammar', 'type' => 'framework'], 'phpOMS\tests\DataStorage\Database\Schema\Grammar\GrammarTest:testDefault' => ['description' => 'The grammar has the expected default values after initialization', 'type' => 'framework'], - 'phpOMS\tests\DataStorage\Database\Schema\Grammar\GrammarTest:testPrefixInputOutput' => ['description' => 'The grammar can define a default table prefix and return this value', 'type' => 'framework'], 'phpOMS\tests\DataStorage\Database\Schema\Grammar\MysqlGrammarTest' => ['description' => 'Mysql sql schema grammar', 'type' => 'framework'], 'phpOMS\tests\DataStorage\Database\Schema\Grammar\MysqlGrammarTest:testDefault' => ['description' => 'The grammar has the expected default values after initialization', 'type' => 'framework'], diff --git a/minimumSetup.php b/minimumSetup.php index fe0b122..efb1996 100644 --- a/minimumSetup.php +++ b/minimumSetup.php @@ -28,8 +28,7 @@ $config = [ 'login' => 'root', /* db login name */ 'password' => 'root', /* db login password */ 'database' => 'oms', /* db name */ - 'prefix' => 'oms_', /* db table prefix */ - 'weight' => 1000, /* db table prefix */ + 'weight' => 1000, /* db table weight */ ], 'insert' => [ 'db' => 'mysql', /* db type */ @@ -38,8 +37,7 @@ $config = [ 'login' => 'root', /* db login name */ 'password' => 'root', /* db login password */ 'database' => 'oms', /* db name */ - 'prefix' => 'oms_', /* db table prefix */ - 'weight' => 1000, /* db table prefix */ + 'weight' => 1000, /* db table weight */ ], 'select' => [ 'db' => 'mysql', /* db type */ @@ -48,8 +46,7 @@ $config = [ 'login' => 'root', /* db login name */ 'password' => 'root', /* db login password */ 'database' => 'oms', /* db name */ - 'prefix' => 'oms_', /* db table prefix */ - 'weight' => 1000, /* db table prefix */ + 'weight' => 1000, /* db table weight */ ], 'update' => [ 'db' => 'mysql', /* db type */ @@ -58,8 +55,7 @@ $config = [ 'login' => 'root', /* db login name */ 'password' => 'root', /* db login password */ 'database' => 'oms', /* db name */ - 'prefix' => 'oms_', /* db table prefix */ - 'weight' => 1000, /* db table prefix */ + 'weight' => 1000, /* db table weight */ ], 'delete' => [ 'db' => 'mysql', /* db type */ @@ -68,8 +64,7 @@ $config = [ 'login' => 'root', /* db login name */ 'password' => 'root', /* db login password */ 'database' => 'oms', /* db name */ - 'prefix' => 'oms_', /* db table prefix */ - 'weight' => 1000, /* db table prefix */ + 'weight' => 1000, /* db table weight */ ], 'schema' => [ 'db' => 'mysql', /* db type */ @@ -78,8 +73,7 @@ $config = [ 'login' => 'root', /* db login name */ 'password' => 'root', /* db login password */ 'database' => 'oms', /* db name */ - 'prefix' => 'oms_', /* db table prefix */ - 'weight' => 1000, /* db table prefix */ + 'weight' => 1000, /* db table weight */ ], ], ], @@ -138,7 +132,6 @@ $request->setMethod(RequestMethod::POST); $request->setData('dbhost', $config['db']['core']['masters']['admin']['host']); $request->setData('dbtype', $config['db']['core']['masters']['admin']['db']); $request->setData('dbport', $config['db']['core']['masters']['admin']['port']); -$request->setData('dbprefix', $config['db']['core']['masters']['admin']['prefix']); $request->setData('dbname', $config['db']['core']['masters']['admin']['database']); $request->setData('schemauser', $config['db']['core']['masters']['admin']['login']); $request->setData('schemapassword', $config['db']['core']['masters']['admin']['password']);