-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add return type for search function
- Loading branch information
Showing
4 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
-- Deploy ggircs-portal:types/search_certification_url_result to pg | ||
-- requires: schema_ggircs_portal | ||
|
||
begin; | ||
|
||
create type ggircs_portal.facility_search_result as ( | ||
id integer, | ||
application_id integer, | ||
version_number integer, | ||
facility_name varchar(1000), | ||
operator_name varchar(1000), | ||
application_revision_status ggircs_portal.ciip_application_revision_status, | ||
certified_at timestamptz, | ||
certified_by varchar(1000), | ||
user_first_name varchar(1000), | ||
user_last_name varchar(1000) | ||
); | ||
|
||
comment on type ggircs_portal.facility_search_result is '@primaryKey (id)'; | ||
commit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- Revert ggircs-portal:types/search_certification_url_result from pg | ||
|
||
begin; | ||
|
||
drop type ggircs_portal.search_certification_url_result; | ||
|
||
commit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
-- Verify ggircs-portal:types/search_certification_url_result on pg | ||
|
||
begin; | ||
|
||
do $$ | ||
begin | ||
assert ( | ||
select true from pg_catalog.pg_type where typname = 'search_certification_url_result' | ||
), 'type "search_certification_url_result" is not defined'; | ||
end; | ||
$$; | ||
|
||
rollback; |