Skip to content

Commit

Permalink
Merge pull request #7569 from laboro/ticket/CRM-7627_update_broken_2.0
Browse files Browse the repository at this point in the history
CRM-7627: Update from 1.9.3 to 2.0.1 is broken
  • Loading branch information
yurio authored Feb 14, 2017
2 parents b1c32ec + 7bcd871 commit 64d7c31
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ public function up(Schema $schema, QueryBag $queries)
'budget_amount_value',
'created_at'
];
if ($table->hasIndex($indexName) && $table->getIndex($indexName)->getColumns() !== $indexColumns) {
$table->dropIndex($indexName);
$table->addIndex($indexColumns, $indexName);
if ($table->hasIndex($indexName)) {
if ($table->getIndex($indexName)->getColumns() !== $indexColumns) {
$table->dropIndex($indexName);
$table->addIndex($indexColumns, $indexName);
}
} else {
$table->addIndex($indexColumns, $indexName);
}
Expand Down

0 comments on commit 64d7c31

Please sign in to comment.