mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-29 20:41:03 +00:00
Code review
This commit is contained in:
parent
d79b3adbed
commit
65a8c6e135
2 changed files with 4 additions and 7 deletions
|
@ -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');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue