Remove updated_at trigger for embeddings table

This commit is contained in:
Neeraj Gupta 2024-05-17 15:08:48 +05:30
parent fd50461214
commit da155464fa
2 changed files with 17 additions and 0 deletions

View file

@ -1,2 +1,18 @@
-- Add types for the new dcs that are introduced for the derived data
ALTER TABLE embeddings DROP COLUMN IF EXISTS datacenters;
DO
$$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_trigger WHERE tgname = 'update_embeddings_updated_at') THEN
CREATE TRIGGER update_embeddings_updated_at
BEFORE UPDATE
ON embeddings
FOR EACH ROW
EXECUTE PROCEDURE
trigger_updated_at_microseconds_column();
ELSE
RAISE NOTICE 'Trigger update_embeddings_updated_at already exists.';
END IF;
END
$$;

View file

@ -1,3 +1,4 @@
-- Add types for the new dcs that are introduced for the derived data
ALTER TYPE s3region ADD VALUE 'wasabi-eu-central-2-derived';
DROP TRIGGER IF EXISTS update_embeddings_updated_at ON embeddings;
ALTER TABLE embeddings ADD COLUMN IF NOT EXISTS datacenters s3region[] default '{b2-eu-cen}';