forked from wallabag/wallabag
Code review
This commit is contained in:
@ -37,9 +37,9 @@ class Version20161024212538 extends AbstractMigration implements ContainerAwareI
|
|||||||
|
|
||||||
$clientsTable->addForeignKeyConstraint(
|
$clientsTable->addForeignKeyConstraint(
|
||||||
$this->getTable('user'),
|
$this->getTable('user'),
|
||||||
array('user_id'),
|
['user_id'],
|
||||||
array('id'),
|
['id'],
|
||||||
array('onDelete' => 'CASCADE')
|
['onDelete' => 'CASCADE']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -42,12 +42,9 @@ class Version20161122203647 extends AbstractMigration implements ContainerAwareI
|
|||||||
{
|
{
|
||||||
$userTable = $schema->getTable($this->getTable('user'));
|
$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');
|
$userTable->dropColumn('expired');
|
||||||
|
|
||||||
$this->skipIf(false === $userTable->hasColumn('credentials_expired'), 'It seems that you already played this migration.');
|
|
||||||
|
|
||||||
$userTable->dropColumn('credentials_expired');
|
$userTable->dropColumn('credentials_expired');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user