migrations/Version20240613171937.php line 1
<?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 Version20240613171937 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$drop = <<<SQL
ALTER TABLE assistant DROP COLUMN local_vector_database_id;
ALTER TABLE assistant DROP COLUMN local_vector_database_data_url;
SQL;
$this->addSql($drop);
$sql = <<<SQL
create table assistant_database
(
id int auto_increment primary key,
assistant_id int not null,
type varchar(20) not null,
initialized int default 0 null,
parameter varchar(255) null,
data_url varchar(255) null,
reinitialize datetime default CURRENT_TIMESTAMP null,
active tinyint default 1 null,
constraint assistant_database_fk_1
foreign key (assistant_id) references assistant (id)
)
collate = utf8mb4_unicode_ci;
create index assistant_id
on assistant_database (assistant_id);
SQL;
$this->addSql($sql);
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
}
}