balderdashy / sails

Realtime MVC Framework for Node.js
https://sailsjs.com
MIT License
22.85k stars 1.95k forks source link

Schema Diagramming Tool #5450

Closed gunish closed 5 years ago

gunish commented 9 years ago

Hi,

Is there an automatic way to generate an ORD / ERD from the waterline models ? Something on the lines of SchemaSpy ?

I am looking for a schema diagraming tool to visualise the Models which I created for my SailsJS app.

If there is such a thing!

Thanks In advance!

devinivy commented 9 years ago

I've never heard of such a thing, but I think it would be great. @tjwebb do you have any idea?

tjwebb commented 9 years ago

Yea, like a visual entity-relationship mapping tool. I think this would be really cool. It might be worth asking the folks at treeline.io if they have anything in the works.

gunish commented 9 years ago

One way i am trying to work around to getting something going is to utilise the ability to change adapters, here is what I did :

  1. Installed MySql on my machine,
  2. Changed the adapter from my sails application from mongodb to mysql
  3. Ran schemaspy on mysql.

Schema Spy Re-verse engineers diagrams like this : http://schemaspy.sourceforge.net/sample/relationships.html

But I have run into a hickup,

So I was able to get the table description out, but the real nice stuff around reverse engineered relationships is missing.

What do you guys think ?

devinivy commented 9 years ago

@gunish there's a feature request for this in the sails-mysql project: https://github.com/balderdashy/sails-mysql/issues/172

Currently you do have to add FK contraints manually, which I think is a bit of a shortcoming. Would love a PR!

Do you feel like your question has been answered?

dmarcelino commented 9 years ago

Closing this as inactive, please re-open if you feel this hasn't been fully answered. Thanks

gunish commented 9 years ago

Sorry just noticed the comments from @devinivy , yes thats cool, for now in my project, we resorted to doing it manually, but there should be an easy win if we were able to get a a simple drawing library to perform some static code analysis and draw out an ERD. schemaspy is old and very good, we want something basic and in the browser.