Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[server] DB migration scripts for emedding table changes

Neeraj Gupta7634b2c153fa
diff --git a/server/migrations/81_embeddings_type_and_size.down.sql b/server/migrations/81_embeddings_type_and_size.down.sql
new file mode 100644
index 0000000000..1d0bd7cf43
--- /dev/null
+++ b/server/migrations/81_embeddings_type_and_size.down.sql
@@ -0,0 +1,3 @@
+ALTER TABLE embeddings
+ DROP COLUMN IF EXISTS size,
+ DROP COLUMN IF EXISTS version;
diff --git a/server/migrations/81_embeddings_type_and_size.up.sql b/server/migrations/81_embeddings_type_and_size.up.sql
new file mode 100644
index 0000000000..870e52a231
--- /dev/null
+++ b/server/migrations/81_embeddings_type_and_size.up.sql
@@ -0,0 +1,4 @@
+ALTER TYPE model ADD VALUE IF NOT EXISTS 'file-ml-clip-face';
+ALTER TABLE embeddings
+ ADD COLUMN size int DEFAULT NULL,
+ ADD COLUMN version int DEFAULT 1;