mirror of
https://github.com/vrana/adminer.git
synced 2025-08-10 16:44:17 +02:00
MS SQL: Support CHECK constraint
This commit is contained in:
@@ -678,7 +678,7 @@ WHERE sys1.xtype = 'TR' AND sys2.name = " . q($table)
|
|||||||
}
|
}
|
||||||
|
|
||||||
function support($feature) {
|
function support($feature) {
|
||||||
return preg_match('~^(comment|columns|database|drop_col|indexes|descidx|scheme|sql|table|trigger|view|view_trigger)$~', $feature); //! routine|
|
return preg_match('~^(check|comment|columns|database|drop_col|indexes|descidx|scheme|sql|table|trigger|view|view_trigger)$~', $feature); //! routine|
|
||||||
}
|
}
|
||||||
|
|
||||||
function driver_config() {
|
function driver_config() {
|
||||||
|
@@ -539,8 +539,8 @@ function create_routine($routine, $row) {
|
|||||||
function check_constraints($table) {
|
function check_constraints($table) {
|
||||||
// MariaDB contains CHECK_CONSTRAINTS.TABLE_NAME, MySQL and PostrgreSQL not
|
// MariaDB contains CHECK_CONSTRAINTS.TABLE_NAME, MySQL and PostrgreSQL not
|
||||||
return get_key_vals("SELECT c.CONSTRAINT_NAME, CHECK_CLAUSE
|
return get_key_vals("SELECT c.CONSTRAINT_NAME, CHECK_CLAUSE
|
||||||
FROM information_schema.CHECK_CONSTRAINTS c
|
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
|
JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS t ON c.CONSTRAINT_SCHEMA = t.CONSTRAINT_SCHEMA AND c.CONSTRAINT_NAME = t.CONSTRAINT_NAME
|
||||||
WHERE c.CONSTRAINT_SCHEMA = " . q($_GET["ns"] != "" ? $_GET["ns"] : DB) . "
|
WHERE c.CONSTRAINT_SCHEMA = " . q($_GET["ns"] != "" ? $_GET["ns"] : DB) . "
|
||||||
AND t.TABLE_NAME = " . q($table) . "
|
AND t.TABLE_NAME = " . q($table) . "
|
||||||
AND CHECK_CLAUSE NOT LIKE '% IS NOT NULL'"); // ignore default IS NOT NULL checks in PostrgreSQL
|
AND CHECK_CLAUSE NOT LIKE '% IS NOT NULL'"); // ignore default IS NOT NULL checks in PostrgreSQL
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
Adminer 4.17.0-dev:
|
Adminer 4.17.0-dev:
|
||||||
Hide index column options by default
|
Hide index column options by default
|
||||||
MySQL, PostgreSQL: Support CHECK constraint
|
MySQL, PostgreSQL, MS SQL: Support CHECK constraint
|
||||||
PostgreSQL: Link user defined types
|
PostgreSQL: Link user defined types
|
||||||
PostgreSQL: Constraint enum values in editing (bug #270)
|
PostgreSQL: Constraint enum values in editing (bug #270)
|
||||||
SQLite: Show all supported pragmas in Variables
|
SQLite: Show all supported pragmas in Variables
|
||||||
|
Reference in New Issue
Block a user