From e05d1a08e726582e78083eaea0181c82b0996b06 Mon Sep 17 00:00:00 2001 From: Chantal Loncle <82039410+bog-walk@users.noreply.github.com> Date: Wed, 6 Sep 2023 06:55:24 -0400 Subject: [PATCH] fix: EXPOSED-161 SQL Server syntax incorrectly allows CASCADE with dropSchema Add KDocs comment about cascade flag --- .../main/kotlin/org/jetbrains/exposed/sql/SchemaUtils.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/SchemaUtils.kt b/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/SchemaUtils.kt index 30014fd7fe..3a351348c7 100644 --- a/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/SchemaUtils.kt +++ b/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/SchemaUtils.kt @@ -653,12 +653,12 @@ object SchemaUtils { * **Note** that when you are using Mysql or MariaDB, this will fail if you try to drop a schema that * contains a table that is referenced by a table in another schema. * - * @sample org.jetbrains.exposed.sql.tests.shared.SchemaTests + * @sample org.jetbrains.exposed.sql.tests.shared.SchemaTests.testDropSchemaWithCascade * * @param schemas the names of the schema * @param cascade flag to drop schema and all of its objects and all objects that depend on those objects. - * You don't have to specify this option when you are using Mysql or MariaDB - * because whether you specify it or not, all objects in the schema will be dropped. + * **Note** This option is not supported by MySQL, MariaDB, or SQL Server, so all objects in the schema will be + * dropped regardless of the flag's value. * @param inBatch flag to perform schema creation in a single batch */ fun dropSchema(vararg schemas: Schema, cascade: Boolean = false, inBatch: Boolean = false) {