15 lines
374 B
PL/PgSQL
15 lines
374 B
PL/PgSQL
-- Verify camper:season_calendar_season_id_fkey on pg
|
|
|
|
begin;
|
|
|
|
select 1/count(*)
|
|
from pg_constraint
|
|
where conrelid = 'camper.season_calendar'::regclass
|
|
and conname = 'season_calendar_season_id_fkey'
|
|
and contype = 'f'
|
|
and connamespace = 'camper'::regnamespace
|
|
and pg_get_constraintdef(oid) = 'FOREIGN KEY (season_id) REFERENCES camper.season(season_id)'
|
|
;
|
|
|
|
rollback;
|