Remove types from mssql
This commit is contained in:
parent
a3976bf250
commit
982cac1d3a
@ -37,7 +37,7 @@ export const databases = {
|
|||||||
name: "MSSQL",
|
name: "MSSQL",
|
||||||
label: DB.MSSQL,
|
label: DB.MSSQL,
|
||||||
image: mssqlImage,
|
image: mssqlImage,
|
||||||
hasTypes: true,
|
hasTypes: false,
|
||||||
},
|
},
|
||||||
[DB.GENERIC]: {
|
[DB.GENERIC]: {
|
||||||
name: i18n.t("generic"),
|
name: i18n.t("generic"),
|
||||||
|
@ -2,16 +2,7 @@ import { dbToTypes } from "../../data/datatypes";
|
|||||||
import { parseDefault } from "./shared";
|
import { parseDefault } from "./shared";
|
||||||
|
|
||||||
export function toMSSQL(diagram) {
|
export function toMSSQL(diagram) {
|
||||||
const typeStatements = diagram.types
|
return `${diagram.tables
|
||||||
.map(
|
|
||||||
(type) =>
|
|
||||||
`CREATE TYPE [${type.name}] AS TABLE (\n${type.fields
|
|
||||||
.map((f) => `\t[${f.name}] ${f.type}`)
|
|
||||||
.join("\n")}\n);\n`,
|
|
||||||
)
|
|
||||||
.join("\n");
|
|
||||||
|
|
||||||
return `${typeStatements}${diagram.tables
|
|
||||||
.map(
|
.map(
|
||||||
(table) =>
|
(table) =>
|
||||||
`${
|
`${
|
||||||
|
Loading…
Reference in New Issue
Block a user