diff --git a/src/utils/exportSQL/mysql.js b/src/utils/exportSQL/mysql.js index 6d9d4fb..a835778 100644 --- a/src/utils/exportSQL/mysql.js +++ b/src/utils/exportSQL/mysql.js @@ -27,9 +27,11 @@ export function toMySQL(diagram) { `CREATE TABLE \`${table.name}\` (\n${table.fields .map( (field) => - `\t\`${field.name}\` ${parseType(field)}${field.unsigned ? " UNSIGNED" : ""}${ - field.notNull ? " NOT NULL" : "" - }${ + `\t\`${field.name}\` ${parseType(field)}${ + dbToTypes[DB.MYSQL][field.type]?.signed && field.unsigned + ? " UNSIGNED" + : "" + }${field.notNull ? " NOT NULL" : ""}${ field.increment ? " AUTO_INCREMENT" : "" }${field.unique ? " UNIQUE" : ""}${ field.default !== ""