chore(search): retimestamp ru_en migration to 20260707T130000 to avoid collision (#529)
Develop introduced two migrations at the exact 20260707T120000 stamp (ai-chat-metadata, page-history-kind). Three files sharing one timestamp is fragile for deploy ordering, so move #529's ru_en-config migration to a strictly-later, unique 20260707T130000 so it orders cleanly last. It touches only the ru_en text-search config (different tables), so running it after the develop migrations is order-independent and safe. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,7 +24,7 @@ import {
|
||||
const tsquery = require('pg-tsquery')();
|
||||
|
||||
// The FTS text-search configuration used on BOTH the stored side (pages.tsv via
|
||||
// its trigger, see migration 20260707T120000) and the query side here. #529
|
||||
// its trigger, see migration 20260707T130000) and the query side here. #529
|
||||
// acceptance #13 invariant: column config and query config always change as a
|
||||
// pair — flip this only alongside the migration.
|
||||
const TS_CONFIG = 'ru_en';
|
||||
|
||||
+2
-2
@@ -152,7 +152,7 @@ async function swapEmbeddingsFtsConfig(
|
||||
if (!inlineEmbeddingsRewriteEnabled()) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(
|
||||
`[migration 20260707T120000] SEARCH_EMBEDDINGS_FTS_INLINE_REWRITE=false: ` +
|
||||
`[migration 20260707T130000] SEARCH_EMBEDDINGS_FTS_INLINE_REWRITE=false: ` +
|
||||
`SKIPPING the page_embeddings.fts rewrite to '${config}'. The operator MUST ` +
|
||||
`perform this fts swap out-of-band. Until then the RAG lexical leg stays on ` +
|
||||
`its current config while the query config is '${config}' (documented, ` +
|
||||
@@ -232,7 +232,7 @@ export async function down(db: Kysely<any>): Promise<void> {
|
||||
if ((await embeddingsFtsExpr(db)).includes('ru_en')) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(
|
||||
`[migration 20260707T120000] down(): page_embeddings.fts still references ` +
|
||||
`[migration 20260707T130000] down(): page_embeddings.fts still references ` +
|
||||
`ru_en (inline rewrite was gated off) — leaving the ru_en text-search ` +
|
||||
`configuration in place. Drop it out-of-band once fts is back on 'english'.`,
|
||||
);
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Kysely, sql } from 'kysely';
|
||||
import { getTestDb, destroyTestDb } from './db';
|
||||
import * as migration from '../../src/database/migrations/20260707T120000-search-ru-en-config';
|
||||
import * as migration from '../../src/database/migrations/20260707T130000-search-ru-en-config';
|
||||
|
||||
/**
|
||||
* #529 A1 — the ru_en config migration must be REVERSIBLE in the correct order:
|
||||
|
||||
Reference in New Issue
Block a user