You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1006 B
30 lines
1006 B
<?php
|
|
namespace Application\Migrations;
|
|
|
|
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
use Doctrine\DBAL\Schema\Schema;
|
|
|
|
class VersionExpireEmailValidation20180615075135 extends AbstractMigration
|
|
{
|
|
|
|
public function up(Schema $schema)
|
|
{
|
|
$expires = $schema->getTable('vierbergenlars_expire_email_validation');
|
|
|
|
foreach ($expires->getForeignKeys() as $fk) {
|
|
$expires->removeForeignKey($fk->getName());
|
|
$expires->addForeignKeyConstraint($fk->getForeignTableName(), $fk->getColumns(), $fk->getForeignColumns(), [
|
|
'onDelete' => 'CASCADE'
|
|
]);
|
|
}
|
|
}
|
|
|
|
public function down(Schema $schema)
|
|
{
|
|
$expires = $schema->getTable('vierbergenlars_expire_email_validation');
|
|
foreach ($expires->getForeignKeys() as $fk) {
|
|
$expires->removeForeignKey($fk->getName());
|
|
$expires->addForeignKeyConstraint($fk->getForeignTableName(), $fk->getColumns(), $fk->getForeignColumns());
|
|
}
|
|
}
|
|
}
|
|
|