Skip to content

Commit 1540f20

Browse files
committed
set storage to external
1 parent a40b3b4 commit 1540f20

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: server/src/migrations/1718486162779-AddFaceSearchRelation.ts

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ export class AddFaceSearchRelation1718486162779 implements MigrationInterface {
1414
"faceId" uuid PRIMARY KEY REFERENCES asset_faces(id) ON DELETE CASCADE,
1515
embedding vector(512) NOT NULL )`);
1616

17+
await queryRunner.query(`ALTER TABLE face_search ALTER COLUMN embedding SET STORAGE EXTERNAL`);
18+
await queryRunner.query(`ALTER TABLE smart_search ALTER COLUMN embedding SET STORAGE EXTERNAL`);
19+
1720
await queryRunner.query(`
1821
INSERT INTO face_search("faceId", embedding)
1922
SELECT id, embedding
@@ -34,6 +37,8 @@ export class AddFaceSearchRelation1718486162779 implements MigrationInterface {
3437
}
3538

3639
await queryRunner.query(`ALTER TABLE asset_faces ADD COLUMN "embedding" vector(512)`);
40+
await queryRunner.query(`ALTER TABLE face_search ALTER COLUMN embedding SET STORAGE DEFAULT`);
41+
await queryRunner.query(`ALTER TABLE smart_search ALTER COLUMN embedding SET STORAGE DEFAULT`);
3742
await queryRunner.query(`
3843
UPDATE asset_faces
3944
SET embedding = fs.embedding

0 commit comments

Comments
 (0)