From bdc28bc959af5d33ee998b7a43973be61aeba659 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 8 Feb 2026 08:44:06 +0100 Subject: [PATCH] non-PostgreSQL: display NOT NULL checks (fix #1237) --- CHANGELOG.md | 1 + adminer/include/driver.inc.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b3a3ece..bd776fe7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - PostgreSQL: Fix definition of complex generated columns - PostgreSQL: Mark unique partial indexes as unique (bug #1172) - PostgreSQL: fix namespace in inheritance links (bug #1221) +- non-PostgreSQL: display NOT NULL checks (bug #1237) - ClickHouse: Fix offset (bug #1188) - ClickHouse: Fix list of tables (bug #1176) - Plugins: Methods showVariables() and showStatus() (bug #1157) diff --git a/adminer/include/driver.inc.php b/adminer/include/driver.inc.php index b0f1ceb9..79fc1f9b 100644 --- a/adminer/include/driver.inc.php +++ b/adminer/include/driver.inc.php @@ -271,8 +271,8 @@ abstract class SqlDriver { FROM INFORMATION_SCHEMA.CHECK_CONSTRAINTS c JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS t ON c.CONSTRAINT_SCHEMA = t.CONSTRAINT_SCHEMA AND c.CONSTRAINT_NAME = t.CONSTRAINT_NAME" . ($this->conn->flavor == 'maria' ? " AND c.TABLE_NAME = t.TABLE_NAME" : "") . " WHERE c.CONSTRAINT_SCHEMA = " . q($_GET["ns"] != "" ? $_GET["ns"] : DB) . " -AND t.TABLE_NAME = " . q($table) . " -AND CHECK_CLAUSE NOT LIKE '% IS NOT NULL'", $this->conn); // ignore default IS NOT NULL checks in PostrgreSQL +AND t.TABLE_NAME = " . q($table) . (JUSH == "pgsql" ? " +AND CHECK_CLAUSE NOT LIKE '% IS NOT NULL'" : ""), $this->conn); // ignore default IS NOT NULL checks in PostrgreSQL } /** Get all fields in the current schema