Database diagrams editor that allows you to visualize and design your DB with a single query.
TypeScript databasedbdb-migrationeditorerdmariadbmssqlmysqlpostgresqlreactreact-flowschema-migrationssqlsqlitetypescriptvisualizationxyflow
fix(sql-server import) nullable should be boolean instead of string (#480)
Jonathan Fishner635fb53c9f7e
diff --git a/src/lib/data/import-metadata/scripts/sqlserver-script.ts b/src/lib/data/import-metadata/scripts/sqlserver-script.tsindex 2a842579..6d2077f4 100644--- a/src/lib/data/import-metadata/scripts/sqlserver-script.ts+++ b/src/lib/data/import-metadata/scripts/sqlserver-script.ts@@ -76,9 +76,9 @@ cols AS (ELSE'null'END +- ', "nullable": "' ++ ', "nullable": ' +CASE WHEN cols.IS_NULLABLE = 'YES' THEN 'true' ELSE 'false' END +- '", "default": "' ++ ', "default": "' +COALESCE(REPLACE(CAST(cols.COLUMN_DEFAULT AS NVARCHAR(MAX)), '"', '\\"'), '') +'", "collation": "' +COALESCE(cols.COLLATION_NAME, '') +@@ -308,9 +308,9 @@ cols AS (ELSE'null'END +- ', "nullable": "' ++ ', "nullable": ' +CASE WHEN cols.IS_NULLABLE = 'YES' THEN 'true' ELSE 'false' END +- '", "default": "' ++ ', "default": "' +COALESCE(REPLACE(CAST(cols.COLUMN_DEFAULT AS NVARCHAR(MAX)), '"', '"'), '') +'", "collation": "' +COALESCE(cols.COLLATION_NAME, '') +