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 {
|
||||
$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;
|
||||
}
|
||||
return $join;
|
||||
|
|
|
@ -37,14 +37,14 @@ class AllDatabaseTest extends PHPUnit_Framework_TestSuite {
|
|||
$suite = new PHPUnit_Framework_TestSuite('Datasources, Schema and DbAcl tests');
|
||||
|
||||
$path = CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS;
|
||||
|
||||
$tasks = array(
|
||||
'db_acl',
|
||||
'cake_schema',
|
||||
'connection_manager',
|
||||
'datasources' . DS . 'dbo_source',
|
||||
'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) {
|
||||
$suite->addTestFile($path . $task . '.test.php');
|
||||
|
|
Loading…
Reference in a new issue