<?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 Version20260630132721 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 odoo_sign_procedure_v2 (id INT AUTO_INCREMENT NOT NULL, document_id INT NOT NULL, odoo_request_id INT DEFAULT NULL, odoo_template_id INT DEFAULT NULL, odoo_attachment_id INT DEFAULT NULL, status VARCHAR(30) NOT NULL, signers JSON DEFAULT NULL, signed_file_path VARCHAR(500) DEFAULT NULL, audit_trail_path VARCHAR(500) DEFAULT NULL, page_count INT DEFAULT NULL, odoo_raw_data JSON DEFAULT NULL, created_at DATETIME NOT NULL, sent_at DATETIME DEFAULT NULL, finished_at DATETIME DEFAULT NULL, updated_at DATETIME NOT NULL, UNIQUE INDEX UNIQ_1F5F94B0C33F7837 (document_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE odoo_sign_procedure_v2 ADD CONSTRAINT FK_1F5F94B0C33F7837 FOREIGN KEY (document_id) REFERENCES document_v2 (id)');
$this->addSql('ALTER TABLE president CHANGE is_represante_society is_represante_society TINYINT(1) DEFAULT true');
$this->addSql('ALTER TABLE signature_request_v2 ADD odoo_sign_partner_id INT DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE odoo_sign_procedure_v2 DROP FOREIGN KEY FK_1F5F94B0C33F7837');
$this->addSql('DROP TABLE odoo_sign_procedure_v2');
$this->addSql('ALTER TABLE president CHANGE is_represante_society is_represante_society TINYINT(1) DEFAULT 1');
$this->addSql('ALTER TABLE signature_request_v2 DROP odoo_sign_partner_id');
}
}