Skip to content

Commit

Permalink
fix: conditionally add chain_id col to supabase
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyd-eth committed Sep 30, 2024
1 parent aa32633 commit e154a28
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions supabase/migrations/20240913212505_project_pv_v4_drop.sql
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
DO $
$
BEGIN
IF NOT EXISTS (
SELECT 1
FROM pg_catalog.pg_attribute
WHERE attrelid = 'public.projects'::regclass
AND attname = 'chain_id'
AND NOT attisdropped
) THEN
ALTER TABLE public.projects ADD COLUMN "chain_id" int;
END
IF;
END $$;
ALTER TABLE public.projects
ADD COLUMN
IF NOT EXISTS "chain_id" int;

0 comments on commit e154a28

Please sign in to comment.