diff --git a/metacat-connector-polaris/src/functionalTest/resources/schema.sql b/metacat-connector-polaris/src/functionalTest/resources/schema.sql index c92e58858..aae7a9c23 100644 --- a/metacat-connector-polaris/src/functionalTest/resources/schema.sql +++ b/metacat-connector-polaris/src/functionalTest/resources/schema.sql @@ -24,5 +24,5 @@ create table TBLS ( created_date TIMESTAMP not null, last_updated_by STRING(255), last_updated_date TIMESTAMP not null, - foreign key (db_name) references DBS(name) ON UPDATE CASCADE + foreign key (db_name) references DBS(name) ON DELETE CASCADE ON UPDATE CASCADE ); diff --git a/metacat-connector-polaris/src/test/java/com/netflix/metacat/connector/polaris/PolarisConnectorDatabaseServiceTest.java b/metacat-connector-polaris/src/test/java/com/netflix/metacat/connector/polaris/PolarisConnectorDatabaseServiceTest.java index 0e1d066b0..4d683d7d4 100644 --- a/metacat-connector-polaris/src/test/java/com/netflix/metacat/connector/polaris/PolarisConnectorDatabaseServiceTest.java +++ b/metacat-connector-polaris/src/test/java/com/netflix/metacat/connector/polaris/PolarisConnectorDatabaseServiceTest.java @@ -214,6 +214,7 @@ public void testDeleteDbNoCascades() { Assert.assertTrue(polarisTableService.exists(requestContext, qualifiedName)); polarisDBService.delete(requestContext, DB1_QUALIFIED_NAME); + Assert.assertTrue(polarisDBService.exists(requestContext, DB1_QUALIFIED_NAME)); } }