<?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 Version20230621010720 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('ALTER TABLE tender ADD kode_tender_id INT DEFAULT NULL, DROP kode_tender');
$this->addSql('ALTER TABLE tender ADD CONSTRAINT FK_42057A77D59B85A FOREIGN KEY (kode_tender_id) REFERENCES tender_metode_penyampaian_dokumen_penawaran (id)');
$this->addSql('CREATE INDEX IDX_42057A77D59B85A ON tender (kode_tender_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE tender DROP FOREIGN KEY FK_42057A77D59B85A');
$this->addSql('DROP INDEX IDX_42057A77D59B85A ON tender');
$this->addSql('ALTER TABLE tender ADD kode_tender VARCHAR(255) NOT NULL, DROP kode_tender_id');
}
}