fix escape for column default values

This commit is contained in:
johnnyfish
2024-08-25 18:11:21 +03:00
parent a803988a5e
commit da972738af
5 changed files with 5 additions and 5 deletions

View File

@@ -79,7 +79,7 @@ cols AS (
', "nullable": "' +
CASE WHEN cols.IS_NULLABLE = 'YES' THEN 'true' ELSE 'false' END +
'", "default": "' +
COALESCE(CAST(cols.COLUMN_DEFAULT AS NVARCHAR(MAX)), '') +
COALESCE(REPLACE(CAST(cols.COLUMN_DEFAULT AS NVARCHAR(MAX)), '"', '\\"'), '') +
'", "collation": "' +
COALESCE(cols.COLLATION_NAME, '') +
'"}')