<?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 Version20240330191521 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 tbl_details_production ADD created_by INT DEFAULT NULL, ADD updated_by INT DEFAULT NULL, ADD deleted_by INT DEFAULT NULL, ADD created_at DATETIME DEFAULT NULL, ADD updated_at DATETIME DEFAULT NULL, ADD deleted_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE tbl_details_production ADD CONSTRAINT FK_DC294916DE12AB56 FOREIGN KEY (created_by) REFERENCES user (user_id)');
$this->addSql('ALTER TABLE tbl_details_production ADD CONSTRAINT FK_DC29491616FE72E1 FOREIGN KEY (updated_by) REFERENCES user (user_id)');
$this->addSql('ALTER TABLE tbl_details_production ADD CONSTRAINT FK_DC2949161F6FA0AF FOREIGN KEY (deleted_by) REFERENCES user (user_id)');
$this->addSql('CREATE INDEX IDX_DC294916DE12AB56 ON tbl_details_production (created_by)');
$this->addSql('CREATE INDEX IDX_DC29491616FE72E1 ON tbl_details_production (updated_by)');
$this->addSql('CREATE INDEX IDX_DC2949161F6FA0AF ON tbl_details_production (deleted_by)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE tbl_details_production DROP FOREIGN KEY FK_DC294916DE12AB56');
$this->addSql('ALTER TABLE tbl_details_production DROP FOREIGN KEY FK_DC29491616FE72E1');
$this->addSql('ALTER TABLE tbl_details_production DROP FOREIGN KEY FK_DC2949161F6FA0AF');
$this->addSql('DROP INDEX IDX_DC294916DE12AB56 ON tbl_details_production');
$this->addSql('DROP INDEX IDX_DC29491616FE72E1 ON tbl_details_production');
$this->addSql('DROP INDEX IDX_DC2949161F6FA0AF ON tbl_details_production');
$this->addSql('ALTER TABLE tbl_details_production DROP created_by, DROP updated_by, DROP deleted_by, DROP created_at, DROP updated_at, DROP deleted_at');
$this->addSql('ALTER TABLE lnk_moyen_transport_tbl_operation_vente DROP FOREIGN KEY FK_F5DAEC47860E9B21');
$this->addSql('ALTER TABLE lnk_moyen_transport_tbl_operation_vente DROP FOREIGN KEY FK_F5DAEC476C645A7F');
}
}