mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-04-29 12:00:00 +00:00
fix: turn the embedding field into optional (#557)
Some checks are pending
Some checks are pending
* fix: turn the embedding field into optional * enable migration 13 - fixes: #556
This commit is contained in:
parent
97b7fc6e0d
commit
98dadd151a
3 changed files with 11 additions and 0 deletions
|
|
@ -112,6 +112,9 @@ class AsyncMigrationManager:
|
|||
AsyncMigration.from_file(
|
||||
"open_notebook/database/migrations/12.surrealql"
|
||||
),
|
||||
AsyncMigration.from_file(
|
||||
"open_notebook/database/migrations/13.surrealql"
|
||||
),
|
||||
]
|
||||
self.down_migrations = [
|
||||
AsyncMigration.from_file(
|
||||
|
|
@ -150,6 +153,9 @@ class AsyncMigrationManager:
|
|||
AsyncMigration.from_file(
|
||||
"open_notebook/database/migrations/12_down.surrealql"
|
||||
),
|
||||
AsyncMigration.from_file(
|
||||
"open_notebook/database/migrations/13_down.surrealql"
|
||||
),
|
||||
]
|
||||
self.runner = AsyncMigrationRunner(
|
||||
up_migrations=self.up_migrations,
|
||||
|
|
|
|||
3
open_notebook/database/migrations/13.surrealql
Normal file
3
open_notebook/database/migrations/13.surrealql
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
DEFINE FIELD OVERWRITE embedding ON TABLE source_insight TYPE option<array<float>>;
|
||||
DEFINE FIELD OVERWRITE embedding ON TABLE note TYPE option<array<float>>;
|
||||
2
open_notebook/database/migrations/13_down.surrealql
Normal file
2
open_notebook/database/migrations/13_down.surrealql
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
DEFINE FIELD OVERWRITE embedding ON TABLE source_insight TYPE array<float>;
|
||||
DEFINE FIELD OVERWRITE embedding ON TABLE note TYPE array<float>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue