migrations/Version20260630132721.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20260630132721 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $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');
  19.         $this->addSql('ALTER TABLE odoo_sign_procedure_v2 ADD CONSTRAINT FK_1F5F94B0C33F7837 FOREIGN KEY (document_id) REFERENCES document_v2 (id)');
  20.         $this->addSql('ALTER TABLE president CHANGE is_represante_society is_represante_society TINYINT(1) DEFAULT true');
  21.         $this->addSql('ALTER TABLE signature_request_v2 ADD odoo_sign_partner_id INT DEFAULT NULL');
  22.     }
  23.     public function down(Schema $schema): void
  24.     {
  25.         // this down() migration is auto-generated, please modify it to your needs
  26.         $this->addSql('ALTER TABLE odoo_sign_procedure_v2 DROP FOREIGN KEY FK_1F5F94B0C33F7837');
  27.         $this->addSql('DROP TABLE odoo_sign_procedure_v2');
  28.         $this->addSql('ALTER TABLE president CHANGE is_represante_society is_represante_society TINYINT(1) DEFAULT 1');
  29.         $this->addSql('ALTER TABLE signature_request_v2 DROP odoo_sign_partner_id');
  30.     }
  31. }