From 7634b2c153faf6ed3b36261ef8042a3205ba44d0 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Tue, 19 Mar 2024 10:30:32 +0530 Subject: [PATCH] [server] DB migration scripts for emedding table changes --- server/migrations/81_embeddings_type_and_size.down.sql | 3 +++ server/migrations/81_embeddings_type_and_size.up.sql | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 server/migrations/81_embeddings_type_and_size.down.sql create mode 100644 server/migrations/81_embeddings_type_and_size.up.sql 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;