-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#945 | Add table exists check to handle error during test db create s…
…cenario
- Loading branch information
Showing
1 changed file
with
15 additions
and
1 deletion.
There are no files selected for viewing
16 changes: 15 additions & 1 deletion
16
avni-server-api/src/main/resources/db/migration/beforeValidate.sql
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 |
---|---|---|
@@ -1 +1,15 @@ | ||
update schema_version set checksum = 1576932710 where version = '1.282' and checksum=-1686581224; | ||
DO $$ | ||
BEGIN | ||
IF EXISTS | ||
( SELECT 1 | ||
FROM information_schema.tables | ||
WHERE table_schema = 'public' | ||
AND table_name = 'schema_version' | ||
) | ||
THEN | ||
update schema_version | ||
set checksum = 1576932710 | ||
where version = '1.282' and checksum=-1686581224; | ||
END IF ; | ||
END | ||
$$ ; |