Skip to content

Commit

Permalink
chore: flip order of branches in when statement for reachability
Browse files Browse the repository at this point in the history
  • Loading branch information
joc-a committed Jun 9, 2023
1 parent b38474b commit 12a12f9
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ data class ForeignKeyConstraint(
if (deleteRule != ReferenceOption.NO_ACTION) {
if (deleteRule == ReferenceOption.SET_DEFAULT) {
when (currentDialect) {
is MysqlDialect -> exposedLogger.warn(
"MySQL doesn't support FOREIGN KEY with SET DEFAULT reference option with ON DELETE clause. " +
"Please check your $fromTableName table."
)
is MariaDBDialect -> exposedLogger.warn(
"MariaDB doesn't support FOREIGN KEY with SET DEFAULT reference option with ON DELETE clause. " +
"Please check your $fromTableName table."
)
is MysqlDialect -> exposedLogger.warn(
"MySQL doesn't support FOREIGN KEY with SET DEFAULT reference option with ON DELETE clause. " +
"Please check your $fromTableName table."
)
else -> append(" ON DELETE $deleteRule")
}
} else {
Expand All @@ -144,15 +144,14 @@ data class ForeignKeyConstraint(
exposedLogger.warn("Oracle doesn't support FOREIGN KEY with ON UPDATE clause. Please check your $fromTableName table.")
} else if (updateRule == ReferenceOption.SET_DEFAULT) {
when (currentDialect) {
is MariaDBDialect -> exposedLogger.warn(
"MariaDB doesn't support FOREIGN KEY with SET DEFAULT reference option with ON UPDATE clause. " +
"Please check your $fromTableName table."
)
is MysqlDialect -> exposedLogger.warn(
"MySQL doesn't support FOREIGN KEY with SET DEFAULT reference option with ON UPDATE clause. " +
"Please check your $fromTableName table."
)
is MariaDBDialect ->
exposedLogger.warn(
"MariaDB doesn't support FOREIGN KEY with SET DEFAULT reference option with ON UPDATE clause. " +
"Please check your $fromTableName table."
)
else -> append(" ON UPDATE $updateRule")
}
} else {
Expand Down

0 comments on commit 12a12f9

Please sign in to comment.