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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
tos/Resources/migrations/VersionTos20180615080524.php

30 lines
916 B

<?php
namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class VersionTos20180615080524 extends AbstractMigration
{
public function up(Schema $schema)
{
$tos = $schema->getTable('vierbergenlars_tos');
foreach ($tos->getForeignKeys() as $fk) {
$tos->removeForeignKey($fk->getName());
$tos->addForeignKeyConstraint($fk->getForeignTableName(), $fk->getColumns(), $fk->getForeignColumns(), [
'onDelete' => 'CASCADE'
]);
}
}
public function down(Schema $schema)
{
$tos = $schema->getTable('vierbergenlars_tos');
foreach ($tos->getForeignKeys() as $fk) {
$tos->removeForeignKey($fk->getName());
$tos->addForeignKeyConstraint($fk->getForeignTableName(), $fk->getColumns(), $fk->getForeignColumns());
}
}
}