Code review

This commit is contained in:
Nicolas Lœuillet 2016-11-30 11:27:07 +01:00
parent d79b3adbed
commit 65a8c6e135
No known key found for this signature in database
GPG key ID: BDC1EFB5CA0145F2
2 changed files with 4 additions and 7 deletions

View file

@ -37,9 +37,9 @@ class Version20161024212538 extends AbstractMigration implements ContainerAwareI
$clientsTable->addForeignKeyConstraint(
$this->getTable('user'),
array('user_id'),
array('id'),
array('onDelete' => 'CASCADE')
['user_id'],
['id'],
['onDelete' => 'CASCADE']
);
}

View file

@ -42,12 +42,9 @@ class Version20161122203647 extends AbstractMigration implements ContainerAwareI
{
$userTable = $schema->getTable($this->getTable('user'));
$this->skipIf(false === $userTable->hasColumn('expired'), 'It seems that you already played this migration.');
$this->skipIf(false === $userTable->hasColumn('expired') || false === $userTable->hasColumn('credentials_expired'), 'It seems that you already played this migration.');
$userTable->dropColumn('expired');
$this->skipIf(false === $userTable->hasColumn('credentials_expired'), 'It seems that you already played this migration.');
$userTable->dropColumn('credentials_expired');
}