Skip to content

Commit

Permalink
include migration
Browse files Browse the repository at this point in the history
  • Loading branch information
KatjaGlassConsulting committed May 28, 2024
1 parent 9f0ad8a commit 76b4a43
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions Migrations/Version20240828161654.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

declare(strict_types=1);

/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace ApprovalBundle\Migrations;

use App\Doctrine\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;

/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240828161654 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}

public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE kimai2_ext_approval_history DROP FOREIGN KEY FK_A8341CE3FE65F000');
$this->addSql('ALTER TABLE kimai2_ext_approval_history DROP FOREIGN KEY FK_A8341CE36BF700BD');

$this->addSql('ALTER TABLE kimai2_ext_approval_history ADD CONSTRAINT FK_A9341CE3FE65F000 FOREIGN KEY (approval_id) REFERENCES kimai2_ext_approval (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE kimai2_ext_approval_history ADD CONSTRAINT FK_A9341CE36BF700BD FOREIGN KEY (status_id) REFERENCES kimai2_ext_approval_status (id) ON DELETE CASCADE');
}


public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE kimai2_ext_approval_history DROP FOREIGN KEY FK_A9341CE3FE65F000');
$this->addSql('ALTER TABLE kimai2_ext_approval_history DROP FOREIGN KEY FK_A9341CE36BF700BD');

$this->addSql('ALTER TABLE kimai2_ext_approval_history ADD CONSTRAINT FK_A8341CE3FE65F000 FOREIGN KEY (approval_id) REFERENCES kimai2_ext_approval (id)');
$this->addSql('ALTER TABLE kimai2_ext_approval_history ADD CONSTRAINT FK_A8341CE36BF700BD FOREIGN KEY (status_id) REFERENCES kimai2_ext_approval_status (id)');
}
}

0 comments on commit 76b4a43

Please sign in to comment.