In Oracle ignore non-existant tables when dropping

If tables don't exist, ignore that error when dropping.

This aligns Oracle with the existing mysql, postgresql, h2, and hsqldb behavior.
This commit is contained in:
Craig Andrews
2019-05-31 20:49:17 -04:00
committed by Rob Winch
parent e8e65ac09f
commit 050ff7538b

View File

@@ -1,2 +1,18 @@
DROP TABLE SPRING_SESSION_ATTRIBUTES;
DROP TABLE SPRING_SESSION;
BEGIN
BEGIN
EXECUTE IMMEDIATE 'DROP TABLE SPRING_SESSION_ATTRIBUTES';
EXCEPTION
WHEN OTHERS THEN
IF SQLCODE != -942 THEN
RAISE;
END IF;
END;
BEGIN
EXECUTE IMMEDIATE 'DROP TABLE SPRING_SESSION';
EXCEPTION
WHEN OTHERS THEN
IF SQLCODE != -942 THEN
RAISE;
END IF;
END;
END;