<?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 Version20241121175403 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 tramite_accion (id INT AUTO_INCREMENT NOT NULL, grupo_id INT DEFAULT NULL, accion_id INT DEFAULT NULL, nombre VARCHAR(255) NOT NULL, codigo VARCHAR(255) DEFAULT NULL, descripcion VARCHAR(500) NOT NULL, link LONGTEXT DEFAULT NULL, path_interno LONGTEXT DEFAULT NULL, es_path_interno TINYINT(1) NOT NULL, activo TINYINT(1) NOT NULL, posicion INT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, INDEX IDX_268CBFFB9C833003 (grupo_id), INDEX IDX_268CBFFB3F4B5275 (accion_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE tramite_accion ADD CONSTRAINT FK_268CBFFB9C833003 FOREIGN KEY (grupo_id) REFERENCES grupo_accion (id)');
$this->addSql('ALTER TABLE tramite_accion ADD CONSTRAINT FK_268CBFFB3F4B5275 FOREIGN KEY (accion_id) REFERENCES accion (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE tramite_accion');
}
}