Agenda, Agendador, Configurações
This commit is contained in:
20
DBS/2026-03-11/supabase-snippets/Untitled query 157.sql
Normal file
20
DBS/2026-03-11/supabase-snippets/Untitled query 157.sql
Normal file
@@ -0,0 +1,20 @@
|
||||
do $$
|
||||
begin
|
||||
if exists (
|
||||
select 1
|
||||
from information_schema.columns
|
||||
where table_schema = 'public'
|
||||
and table_name = 'patient_patient_tag'
|
||||
and column_name = 'patient_tag_id'
|
||||
)
|
||||
and not exists (
|
||||
select 1
|
||||
from information_schema.columns
|
||||
where table_schema = 'public'
|
||||
and table_name = 'patient_patient_tag'
|
||||
and column_name = 'tag_id'
|
||||
) then
|
||||
alter table public.patient_patient_tag
|
||||
rename column patient_tag_id to tag_id;
|
||||
end if;
|
||||
end $$;
|
||||
Reference in New Issue
Block a user