mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Pepending table name to index generation to avoid name clashes
Finally, all tests using a Sqlite database pass
This commit is contained in:
parent
e167271568
commit
66d0986cd4
2 changed files with 4 additions and 3 deletions
|
@ -443,7 +443,8 @@ class DboSqlite extends DboSource {
|
||||||
} else {
|
} else {
|
||||||
$value['column'] = $this->name($value['column']);
|
$value['column'] = $this->name($value['column']);
|
||||||
}
|
}
|
||||||
$out .= "INDEX {$name} ON {$table}({$value['column']});";
|
$t = trim($table, '"');
|
||||||
|
$out .= "INDEX {$t}_{$name} ON {$table}({$value['column']});";
|
||||||
$join[] = $out;
|
$join[] = $out;
|
||||||
}
|
}
|
||||||
return $join;
|
return $join;
|
||||||
|
|
|
@ -37,14 +37,14 @@ class AllDatabaseTest extends PHPUnit_Framework_TestSuite {
|
||||||
$suite = new PHPUnit_Framework_TestSuite('Datasources, Schema and DbAcl tests');
|
$suite = new PHPUnit_Framework_TestSuite('Datasources, Schema and DbAcl tests');
|
||||||
|
|
||||||
$path = CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS;
|
$path = CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS;
|
||||||
|
|
||||||
$tasks = array(
|
$tasks = array(
|
||||||
'db_acl',
|
'db_acl',
|
||||||
'cake_schema',
|
'cake_schema',
|
||||||
'connection_manager',
|
'connection_manager',
|
||||||
'datasources' . DS . 'dbo_source',
|
'datasources' . DS . 'dbo_source',
|
||||||
'datasources' . DS . 'dbo' . DS . 'dbo_mysql',
|
'datasources' . DS . 'dbo' . DS . 'dbo_mysql',
|
||||||
'datasources' . DS . 'dbo' . DS . 'dbo_postgres'
|
'datasources' . DS . 'dbo' . DS . 'dbo_postgres',
|
||||||
|
'datasources' . DS . 'dbo' . DS . 'dbo_sqlite'
|
||||||
);
|
);
|
||||||
foreach ($tasks as $task) {
|
foreach ($tasks as $task) {
|
||||||
$suite->addTestFile($path . $task . '.test.php');
|
$suite->addTestFile($path . $task . '.test.php');
|
||||||
|
|
Loading…
Reference in a new issue