Skip to content

Commit

Permalink
Merge pull request mautic#4059 from escopecz/bug-date-added-country-i…
Browse files Browse the repository at this point in the history
…ndex-migration-fix

Fixed issue where the migration was processed even if it was applied already
  • Loading branch information
virlatinus authored May 30, 2017
2 parents d5b008d + 2ed500f commit 3a60b22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/migrations/Version20170303000000.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class Version20170303000000 extends AbstractMauticMigration
*/
public function preUp(Schema $schema)
{
$table = $schema->getTable(MAUTIC_TABLE_PREFIX.'leads');
if ($table->hasIndex('date_added_country_index')) {
$table = $schema->getTable("{$this->prefix}leads");
if ($table->hasIndex("{$this->prefix}date_added_country_index")) {
throw new SkipMigrationException('Schema includes this migration');
}
}
Expand Down

0 comments on commit 3a60b22

Please sign in to comment.