Change the verify for season_calendar_season_id_fkey

It failed in build.opensuse.org; possibly the view in information_scheme
is different.
This commit is contained in:
jordi fita mas 2024-03-14 22:28:46 +01:00
parent 0412ffca05
commit dbbd06cf85
1 changed files with 6 additions and 8 deletions

View File

@ -3,14 +3,12 @@
begin;
select 1/count(*)
from information_schema.constraint_column_usage
where table_catalog = 'camper'
and table_schema = 'camper'
and table_name = 'season'
and column_name = 'season_id'
and constraint_catalog = 'camper'
and constraint_schema = 'camper'
and constraint_name = 'season_calendar_season_id_fkey'
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;