mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 15:47:00 +02:00
MS SQL: Fix collation issues when retrieving default values
I was getting this error:
Error in query (4189): Cannot convert to text/ntext or collate to 'Czech_100_CI_AI_SC_UTF8' because these legacy LOB types do not support UTF-8 or UTF-16 encodings. Use types varchar(max), nvarchar(max) or a collation which does not have the _SC or _UTF8 flags.
This reverts part of a2adb67
.
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
- PostgreSQL: Display auto_increment of inserted rows
|
- PostgreSQL: Display auto_increment of inserted rows
|
||||||
- PostgreSQL: Display description of system variables
|
- PostgreSQL: Display description of system variables
|
||||||
- PostgreSQL: Avoid warning about crdb_version (bug #924, regression from 5.0.5)
|
- PostgreSQL: Avoid warning about crdb_version (bug #924, regression from 5.0.5)
|
||||||
|
- MS SQL: Fix collation issues when retrieving default values
|
||||||
- CSS: Sticky table headers (bug #918)
|
- CSS: Sticky table headers (bug #918)
|
||||||
- CSS: Allow more custom styles with dark mode (bug #925)
|
- CSS: Allow more custom styles with dark mode (bug #925)
|
||||||
- IMAP: New plugin driver created for fun
|
- IMAP: New plugin driver created for fun
|
||||||
|
@@ -355,7 +355,7 @@ WHERE schema_id = SCHEMA_ID(" . q(get_schema()) . ") AND type IN ('S', 'U', 'V')
|
|||||||
$return = array();
|
$return = array();
|
||||||
$table_id = get_val("SELECT object_id FROM sys.all_objects WHERE schema_id = SCHEMA_ID(" . q(get_schema()) . ") AND type IN ('S', 'U', 'V') AND name = " . q($table));
|
$table_id = get_val("SELECT object_id FROM sys.all_objects WHERE schema_id = SCHEMA_ID(" . q(get_schema()) . ") AND type IN ('S', 'U', 'V') AND name = " . q($table));
|
||||||
foreach (
|
foreach (
|
||||||
get_rows("SELECT c.max_length, c.precision, c.scale, c.name, c.is_nullable, c.is_identity, c.collation_name, t.name type, CAST(d.definition as text) [default], d.name default_constraint, i.is_primary_key
|
get_rows("SELECT c.max_length, c.precision, c.scale, c.name, c.is_nullable, c.is_identity, c.collation_name, t.name type, d.definition [default], d.name default_constraint, i.is_primary_key
|
||||||
FROM sys.all_columns c
|
FROM sys.all_columns c
|
||||||
JOIN sys.types t ON c.user_type_id = t.user_type_id
|
JOIN sys.types t ON c.user_type_id = t.user_type_id
|
||||||
LEFT JOIN sys.default_constraints d ON c.default_object_id = d.object_id
|
LEFT JOIN sys.default_constraints d ON c.default_object_id = d.object_id
|
||||||
|
Reference in New Issue
Block a user