Allow self references

This commit is contained in:
1ilit
2024-02-06 00:42:11 +02:00
parent 1f84e36f8c
commit 604bed67dd
4 changed files with 34 additions and 18 deletions

View File

@@ -46,7 +46,8 @@ import {
jsonToMySQL,
jsonToPostgreSQL,
jsonToSQLite,
jsonToMariaDB
jsonToMariaDB,
jsonToSQLServer
} from "../utils";
import {
AreaContext,
@@ -1010,7 +1011,21 @@ export default function ControlPanel({
}));
},
},
{ DBML: () => { } },
{
"SQL Server": () => {
setVisible(MODAL.CODE);
const src = jsonToSQLServer({
tables: tables,
references: relationships,
types: types,
});
setExportData((prev) => ({
...prev,
data: src,
extension: "sql",
}));
}
},
],
function: () => { },
},