Skip to content

Commit cef8bfc

Browse files
wip : resolved comments
Signed-off-by: Arnesh Dadhich <arnesh.dadhich@unifyapps.com>
1 parent 032f4bb commit cef8bfc

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/server/api/go/internal/bootstrap/container.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ func BuildContainer() *do.Injector {
4848
}
4949
// [optional] auto migrate
5050
if cfg.Database.AutoMigrate {
51+
// Ensure pgvector extension exists
52+
_ = d.Exec("CREATE EXTENSION IF NOT EXISTS vector")
53+
5154
_ = d.AutoMigrate(
5255
&model.Project{},
5356
&model.User{},

src/server/api/go/internal/modules/repo/session_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ func setupSessionTestDB(t *testing.T) *gorm.DB {
2525
return nil
2626
}
2727

28+
// Ensure pgvector extension exists
29+
db.Exec("CREATE EXTENSION IF NOT EXISTS vector")
30+
2831
// Auto migrate all required tables
2932
err = db.AutoMigrate(
3033
&model.Project{},

0 commit comments

Comments
 (0)