fix: turn the embedding field into optional (#557)
* 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(
|
AsyncMigration.from_file(
|
||||||
"open_notebook/database/migrations/12.surrealql"
|
"open_notebook/database/migrations/12.surrealql"
|
||||||
),
|
),
|
||||||
|
AsyncMigration.from_file(
|
||||||
|
"open_notebook/database/migrations/13.surrealql"
|
||||||
|
),
|
||||||
]
|
]
|
||||||
self.down_migrations = [
|
self.down_migrations = [
|
||||||
AsyncMigration.from_file(
|
AsyncMigration.from_file(
|
||||||
|
|
@ -150,6 +153,9 @@ class AsyncMigrationManager:
|
||||||
AsyncMigration.from_file(
|
AsyncMigration.from_file(
|
||||||
"open_notebook/database/migrations/12_down.surrealql"
|
"open_notebook/database/migrations/12_down.surrealql"
|
||||||
),
|
),
|
||||||
|
AsyncMigration.from_file(
|
||||||
|
"open_notebook/database/migrations/13_down.surrealql"
|
||||||
|
),
|
||||||
]
|
]
|
||||||
self.runner = AsyncMigrationRunner(
|
self.runner = AsyncMigrationRunner(
|
||||||
up_migrations=self.up_migrations,
|
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…
Reference in a new issue