<?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 Version20240506142330 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 SEQUENCE E_SignatureEntity_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE TABLE E_SignatureEntity (id INT NOT NULL, mandate_id INT NOT NULL, transaction_id VARCHAR(255) NOT NULL, status VARCHAR(255) DEFAULT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, updated_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_7249B57BD1C07F56 ON E_SignatureEntity (mandate_id)');
$this->addSql('ALTER TABLE E_SignatureEntity ADD CONSTRAINT FK_7249B57BD1C07F56 FOREIGN KEY (mandate_id) REFERENCES mandate (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE mandate ADD esign VARCHAR(255) DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('DROP SEQUENCE E_SignatureEntity_id_seq CASCADE');
$this->addSql('ALTER TABLE E_SignatureEntity DROP CONSTRAINT FK_7249B57BD1C07F56');
$this->addSql('DROP TABLE E_SignatureEntity');
}
}