alpha new hybridretriver line
This commit is contained in:
32
migrations/Version20260225000100.php
Normal file
32
migrations/Version20260225000100.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
final class Version20260225000100 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Adds retrieval_max_chunks and retrieval_vector_top_k to model_generation_config (without DB defaults)';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE model_generation_config
|
||||
ADD retrieval_max_chunks INT NOT NULL,
|
||||
ADD retrieval_vector_top_k INT NOT NULL
|
||||
');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE model_generation_config
|
||||
DROP retrieval_max_chunks,
|
||||
DROP retrieval_vector_top_k
|
||||
');
|
||||
}
|
||||
}
|
||||
35
migrations/Version20260225000200.php
Normal file
35
migrations/Version20260225000200.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
final class Version20260225000200 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Fix schema drift (indexes, FK, longtext nullability)';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE knowledge_tag CHANGE description description LONGTEXT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE knowledge_tag RENAME INDEX uniq_knowledge_tag_slug TO UNIQ_86B46255989D9B62');
|
||||
|
||||
$this->addSql('ALTER TABLE document DROP FOREIGN KEY FK_D8698A769407EE77');
|
||||
$this->addSql('ALTER TABLE document ADD CONSTRAINT FK_D8698A769407EE77 FOREIGN KEY (current_version_id) REFERENCES document_version (id)');
|
||||
|
||||
$this->addSql('ALTER TABLE tag_rebuild_job CHANGE error_message error_message LONGTEXT DEFAULT NULL');
|
||||
|
||||
$this->addSql('ALTER TABLE document_tag RENAME INDEX idx_document_tag_document TO IDX_D0234567C33F7837');
|
||||
$this->addSql('ALTER TABLE document_tag RENAME INDEX idx_document_tag_tag TO IDX_D0234567BAD26311');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// Optional – in Drift-Fix-Migration meist nicht notwendig
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user