<?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 Version20240330153539 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_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_production ADD CONSTRAINT FK_BAAEFB71DE12AB56 FOREIGN KEY (created_by) REFERENCES user (user_id)');
$this->addSql('ALTER TABLE tbl_production ADD CONSTRAINT FK_BAAEFB7116FE72E1 FOREIGN KEY (updated_by) REFERENCES user (user_id)');
$this->addSql('ALTER TABLE tbl_production ADD CONSTRAINT FK_BAAEFB711F6FA0AF FOREIGN KEY (deleted_by) REFERENCES user (user_id)');
$this->addSql('CREATE INDEX IDX_BAAEFB71DE12AB56 ON tbl_production (created_by)');
$this->addSql('CREATE INDEX IDX_BAAEFB7116FE72E1 ON tbl_production (updated_by)');
$this->addSql('CREATE INDEX IDX_BAAEFB711F6FA0AF ON tbl_production (deleted_by)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP INDEX idx_f5daec47860e9b21 ON lnk_moyen_transport_tbl_operation_vente');
$this->addSql('CREATE INDEX IDX_6B7C3D42860E9B21 ON lnk_moyen_transport_tbl_operation_vente (tbl_operation_vente_id)');
$this->addSql('DROP INDEX idx_f5daec476c645a7f ON lnk_moyen_transport_tbl_operation_vente');
$this->addSql('CREATE INDEX IDX_6B7C3D426C645A7F ON lnk_moyen_transport_tbl_operation_vente (ref_moyen_transport_id)');
$this->addSql('ALTER TABLE lnk_moyen_transport_tbl_operation_vente ADD CONSTRAINT FK_F5DAEC47860E9B21 FOREIGN KEY (tbl_operation_vente_id) REFERENCES tbl_operation_vente (id)');
$this->addSql('ALTER TABLE lnk_moyen_transport_tbl_operation_vente ADD CONSTRAINT FK_F5DAEC476C645A7F FOREIGN KEY (ref_moyen_transport_id) REFERENCES ref_moyen_transport (id)');
$this->addSql('ALTER TABLE tbl_mouvement ADD parcelle_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE tbl_mouvement ADD CONSTRAINT FK_1ED993AD4433ED66 FOREIGN KEY (parcelle_id) REFERENCES tbl_parcelle (id)');
$this->addSql('CREATE INDEX IDX_1ED993AD4433ED66 ON tbl_mouvement (parcelle_id)');
}
}