Skip to content
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

single file change for to sql and from sql plugin #4122

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

lastlink
Copy link

@lastlink lastlink commented Jan 21, 2024

Notes:

  • I know this will be rejected since this is close contribution
  • I've updated this from the prs so all you have to do is update the plugin src/main/webapp/plugins/sql.js file to install it locally.
  • I'm aware that using a native tool for your db may be better for uml diagrams.
  • There are many workflows that this works, you can do code share from vscode for collaboration after importing your drawio file from a sql table schema export
  • setup see wiki from branch https://github.com/lastlink/drawio/wiki/Getting-Started
  • It's easiest to setup in the drawio desktop, to use the plugin https://github.com/jgraph/drawio-desktop
    • git clone --recursive https://github.com/jgraph/drawio-desktop.git 1 gb clone btw
    • npm install
    • update drawio/src/main/webapp/plugins/sql.js with changes from branch
    • npm start run application
    • add plugin in Extras > Plugins > Add select sql
    • close application and reopen. Plugin is installed
  • you can find the menu buttons in File > Export As > To SQL or Arrange > Insert > From SQL

References

@davidjgraph
Copy link
Collaborator

We'll look into whether an exception can be made here as it's a significant amount of work to be rejected.

@steel198513
Copy link

I ran through this process but the To SQL option was not showing up on the menu

@lastlink
Copy link
Author

lastlink commented Apr 9, 2024

@steel198513 try looking in File > Export As

@lastlink
Copy link
Author

@karthiart did you pull/copy the updates for the file from this pr? Otherwise you won't have my changes.

@ChrisNolan
Copy link

Thanks for making this available. I was just coming to post some changes that allowed [Spaces in Column Names] to get parsed correctly but yours is so much more robust.

I wanted to share for others coming to this that want just the functionality, but aren't too comfortable with code. You can get a local copy of the plugin if you modify your draw.io desktop shortcut to include a --enable-plugins, e.g. edit your start menu shortcut to be "C:\Program Files\draw.io\draw.io.exe" --enable-plugins. Then when you do the 'add' under the "Extras -> Plugins" menu there will be an option to add a file from disk instead, and you just need to save a 'raw' copy of the 'sql.js' file included here and restart your program to get access to all this functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants