Merge branch 'Issue187' into 'develop'

Install framadate in non empty database

Modifications pour l'issue #187.

See merge request !139
This commit is contained in:
Antonin 2016-08-04 16:57:20 +02:00
parent e642d1e35c
commit ccddddaf2d

View File

@ -48,7 +48,7 @@ class From_0_0_to_0_8_Migration implements Migration {
* @return bool true is the Migration should be executed. * @return bool true is the Migration should be executed.
*/ */
function preCondition(\PDO $pdo) { function preCondition(\PDO $pdo) {
$stmt = $pdo->query('SHOW TABLES'); $stmt = $pdo->query('SHOW TABLES like \'' . TABLENAME_PREFIX . '%\''); //issue187 : pouvoir installer framadate dans une base contenant d'autres tables.
$tables = $stmt->fetchAll(\PDO::FETCH_COLUMN); $tables = $stmt->fetchAll(\PDO::FETCH_COLUMN);
// Check if there is no tables but the MIGRATION_TABLE one // Check if there is no tables but the MIGRATION_TABLE one