-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix export for enum and set types for mysql #252
Conversation
…rn/dompurify-2.5.7 Bump dompurify from 2.4.7 to 2.5.7
Add new entries to the Hungarian localization
@csc530 is attempting to deploy a commit to the dottle's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution. After you fix the comments could you also add this to mariadb as well?
src/utils/exportSQL/mysql.js
Outdated
return `${diagram.tables | ||
.map( | ||
(table) => | ||
`CREATE TABLE \`${table.name}\` (\n${table.fields | ||
.map( | ||
(field) => | ||
`\t\`${field.name}\` ${field.type}${field.unsigned ? " UNSIGNED" : ""}${field.size !== undefined && field.size !== "" ? "(" + field.size + ")" : ""}${ | ||
`\t\`${field.name}\` ${field.type}${field.values ? "(" + field.values.map(value=>"'" + value + "'").join(", ") + ")" : ""}${field.unsigned ? " UNSIGNED" : ""}${field.size !== undefined && field.size !== "" ? "(" + field.size + ")" : ""}${ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please format. If you're on vscode you can use alt+shift+f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I'm using the default "typescript and javascript language features" formatter in vscode
using javascript and typescript language features extension in vscode
src/utils/exportSQL/mariadb.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were a lot of changes when I used vscode's formatter (typeScript and JavaScript Language features extension) let me know if it's ok or if it should be undone
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've realized now that the formatting settings can be changed and I likely don't have the config as was used in the project😅
same for src/utils/exportSQL/mysql.js
|
Hi |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
fixes #251
I tested it with both enum and set types and gives the expected output.
It also shouldn't interfere with any other column types when exporting: as long as their
field
does not contain avalues
property.Please, let me know if any changes or tests need to be made