<?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 Version20241115165853 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 std_prompt_history (id INT AUTO_INCREMENT NOT NULL, created_by INT UNSIGNED DEFAULT NULL COMMENT \'Unique identifier\', updated_by INT UNSIGNED DEFAULT NULL COMMENT \'Unique identifier\', created_date DATETIME NOT NULL COMMENT \'Date and time of the record creation\', updated_date DATETIME NOT NULL COMMENT \'Date and time the record was last updated\', type VARCHAR(10) NOT NULL, titles JSON NOT NULL, history JSON NOT NULL, INDEX IDX_F8BF82A6DE12AB56 (created_by), INDEX IDX_F8BF82A616FE72E1 (updated_by), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE std_prompt_history ADD CONSTRAINT FK_F8BF82A6DE12AB56 FOREIGN KEY (created_by) REFERENCES std_users (id)');
$this->addSql('ALTER TABLE std_prompt_history ADD CONSTRAINT FK_F8BF82A616FE72E1 FOREIGN KEY (updated_by) REFERENCES std_users (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE std_prompt_history DROP FOREIGN KEY FK_F8BF82A6DE12AB56');
$this->addSql('ALTER TABLE std_prompt_history DROP FOREIGN KEY FK_F8BF82A616FE72E1');
$this->addSql('DROP TABLE std_prompt_history');
}
}