evwiki/migrations/Version20250530193246.php
2025-05-30 22:19:43 +02:00

38 lines
918 B
PHP

<?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 Version20250530193246 extends AbstractMigration
{
public function getDescription(): string
{
return 'Create embeddings table';
}
public function up(Schema $schema): void
{
$this->addSql(<<<SQL
CREATE TABLE embeddings (
phrase_hash VARCHAR(255) NOT NULL PRIMARY KEY,
phrase VARCHAR(255) NOT NULL,
large_embedding_vector VECTOR(3072),
small_embedding_vector VECTOR(1536),
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
)
SQL);
}
public function down(Schema $schema): void
{
$this->addSql('DROP TABLE embeddings');
}
}