<?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 Version20241107162659 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 troubleshooting_request (id INT AUTO_INCREMENT NOT NULL, person_id INT DEFAULT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', status VARCHAR(255) NOT NULL, result VARCHAR(255) NOT NULL, review INT DEFAULT NULL, comment VARCHAR(255) DEFAULT NULL, request_text VARCHAR(255) NOT NULL, json_ai_response LONGTEXT NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME DEFAULT NULL, deleted_at DATETIME DEFAULT NULL, UNIQUE INDEX UNIQ_40351FEBD17F50A6 (uuid), INDEX IDX_40351FEB217BBB47 (person_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE troubleshooting_request ADD CONSTRAINT FK_40351FEB217BBB47 FOREIGN KEY (person_id) REFERENCES person (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE troubleshooting_request DROP FOREIGN KEY FK_40351FEB217BBB47');
$this->addSql('DROP TABLE troubleshooting_request');
}
}