<?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 Version20230821090342 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 tender_publish_pokja (id INT AUTO_INCREMENT NOT NULL, tender_id INT DEFAULT NULL, user_id INT DEFAULT NULL, exist TINYINT(1) NOT NULL, INDEX IDX_90F87B469245DE54 (tender_id), INDEX IDX_90F87B46A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE tender_publish_pokja ADD CONSTRAINT FK_90F87B469245DE54 FOREIGN KEY (tender_id) REFERENCES tender (id)');
$this->addSql('ALTER TABLE tender_publish_pokja ADD CONSTRAINT FK_90F87B46A76ED395 FOREIGN KEY (user_id) REFERENCES `user` (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE tender_publish_pokja DROP FOREIGN KEY FK_90F87B469245DE54');
$this->addSql('ALTER TABLE tender_publish_pokja DROP FOREIGN KEY FK_90F87B46A76ED395');
$this->addSql('DROP TABLE tender_publish_pokja');
}
}