<?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 Version20240403070502 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 campaigns CHANGE is_ordored_by_admin is_ordored_by_admin TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE company_data ADD primary_color VARCHAR(255) DEFAULT NULL, ADD second_color VARCHAR(255) DEFAULT NULL, ADD background_color VARCHAR(255) DEFAULT NULL, ADD text_color VARCHAR(255) DEFAULT NULL, ADD block_color VARCHAR(255) DEFAULT NULL, ADD icon_color VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE credit_history CHANGE mensualite mensualite DOUBLE PRECISION DEFAULT NULL, CHANGE annuite annuite DOUBLE PRECISION DEFAULT NULL');
$this->addSql('ALTER TABLE files_descriptions ADD CONSTRAINT FK_796AD16FA76ED395 FOREIGN KEY (user_id) REFERENCES users (id)');
$this->addSql('CREATE INDEX IDX_796AD16FA76ED395 ON files_descriptions (user_id)');
$this->addSql('ALTER TABLE users CHANGE device_connected_list device_connected_list LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\'');
$this->addSql('ALTER TABLE workflow_steps ADD CONSTRAINT FK_856C7C462C7C2CBA FOREIGN KEY (workflow_id) REFERENCES workflows (id)');
$this->addSql('ALTER TABLE workflow_steps ADD CONSTRAINT FK_856C7C46BE04EA9 FOREIGN KEY (job_id) REFERENCES jobs (id)');
$this->addSql('ALTER TABLE workflow_triggers ADD CONSTRAINT FK_C5AD76579D32F035 FOREIGN KEY (action_id) REFERENCES workflow_actions (id)');
$this->addSql('ALTER TABLE workflow_triggers ADD CONSTRAINT FK_C5AD7657131A730F FOREIGN KEY (email_template_id) REFERENCES email_templates (id)');
$this->addSql('ALTER TABLE workflow_triggers ADD CONSTRAINT FK_C5AD7657727ACA70 FOREIGN KEY (parent_id) REFERENCES workflow_triggers (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE campaigns CHANGE is_ordored_by_admin is_ordored_by_admin TINYTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE company_data DROP primary_color, DROP second_color, DROP background_color, DROP text_color, DROP block_color, DROP icon_color');
$this->addSql('ALTER TABLE credit_history CHANGE mensualite mensualite INT DEFAULT NULL, CHANGE annuite annuite INT DEFAULT NULL');
$this->addSql('ALTER TABLE files_descriptions DROP FOREIGN KEY FK_796AD16FA76ED395');
$this->addSql('DROP INDEX IDX_796AD16FA76ED395 ON files_descriptions');
$this->addSql('ALTER TABLE users CHANGE device_connected_list device_connected_list LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci` COMMENT \' (DC2Type:array)\'');
$this->addSql('ALTER TABLE workflow_steps DROP FOREIGN KEY FK_856C7C462C7C2CBA');
$this->addSql('ALTER TABLE workflow_steps DROP FOREIGN KEY FK_856C7C46BE04EA9');
$this->addSql('ALTER TABLE workflow_triggers DROP FOREIGN KEY FK_C5AD76579D32F035');
$this->addSql('ALTER TABLE workflow_triggers DROP FOREIGN KEY FK_C5AD7657131A730F');
$this->addSql('ALTER TABLE workflow_triggers DROP FOREIGN KEY FK_C5AD7657727ACA70');
}
}