From 8edfd8ae0944c65faf8d400749c2a338829766ee Mon Sep 17 00:00:00 2001 From: CollinBeczak Date: Sat, 10 Aug 2024 19:06:13 -0500 Subject: [PATCH] remove unneeded constraint --- conf/evolutions/default/95.sql | 8 -------- 1 file changed, 8 deletions(-) diff --git a/conf/evolutions/default/95.sql b/conf/evolutions/default/95.sql index be01998c..53e9086c 100644 --- a/conf/evolutions/default/95.sql +++ b/conf/evolutions/default/95.sql @@ -9,15 +9,7 @@ ALTER TABLE IF EXISTS users ALTER COLUMN avatar_url SET DEFAULT '/assets/images/user_no_image.png', ALTER COLUMN avatar_url SET NOT NULL; --- Add a CHECK constraint to ensure avatar_url is a string (TEXT type) -ALTER TABLE IF EXISTS users -ADD CONSTRAINT check_avatar_url_is_string CHECK (pg_typeof(avatar_url) = 'text'); - -- --- !Downs --- Remove the CHECK constraint -ALTER TABLE IF EXISTS users -DROP CONSTRAINT IF EXISTS check_avatar_url_is_string; - -- Revert the avatar_url column to allow null values and remove the default value ALTER TABLE IF EXISTS users ALTER COLUMN avatar_url DROP NOT NULL,