<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20230125083437 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE released_workers (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, company_id INT NOT NULL, role_id INT NOT NULL, is_conflict TINYINT(1) NOT NULL, INDEX IDX_3B0119D3A76ED395 (user_id), INDEX IDX_3B0119D3979B1AD6 (company_id), INDEX IDX_3B0119D3D60322AC (role_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE released_workers ADD CONSTRAINT FK_3B0119D3A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE released_workers ADD CONSTRAINT FK_3B0119D3979B1AD6 FOREIGN KEY (company_id) REFERENCES company (id)');
$this->addSql('ALTER TABLE released_workers ADD CONSTRAINT FK_3B0119D3D60322AC FOREIGN KEY (role_id) REFERENCES role (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE released_workers');
}
}