MongoDB / Mongoose Generator for DbSchema

General issues about DbSchema
Post Reply
Posts: 2
Joined: Sun Jul 16, 2017 4:41 pm

MongoDB / Mongoose Generator for DbSchema

Post by MEANFactory » Tue Jul 18, 2017 1:46 am

Yesterday I launched a NodeJS / JavaScript parser for DbSchema. Today I'm adding a CLI and MongoDB / Mongoose generator to that.

Here's how I'm using it today...

1. Use DbSchema to create my models with MySQL as the target database;
2. From the command line, call `dbschema -i %path_to_dbs_file%`
3. Reference the folder, generated in step #2, from within NodeJS

I realise this is really limited at the moment. Obviously, this is what I needed for my world. Having come from .NET Land, and loving the SQL Server Diagram tool, this is letting me remain lazy and comfy by using a domain-first cycle within with Node world.

Anywho... here are the URLs, if you'd like to use 'em:

First, install the Mongoose generator from here:

Second, install the CLI from here:

I hope this helps someone.

Posts: 74
Joined: Tue Dec 01, 2015 8:44 am

Re: MongoDB / Mongoose Generator for DbSchema

Post by support » Thu Aug 17, 2017 6:19 am

Ups, really impressive the code you wrote !
I may try to test it, but before let me explain some features we have in DbSchema.
If you have a MySql schema in DbSchema and you want to export it in another format, you may use Groovy scripts from the SQL editor. Groovy is pure Java plus few extensions like closures, etc. There you have full access to all DbSchema internal objects : Schema, Table, Column, etc. Look in Help under SQL editor for details and few sample scripts. So you can easy have a schema in DbSchema and export it as you like. Is this what you are looking for ?

Posts: 1
Joined: Sat Oct 14, 2017 2:55 am
Location: Denver, Colorado

Re: MongoDB / Mongoose Generator for DbSchema

Post by janesmith76 » Sat Oct 14, 2017 3:15 am

Ups, really impressive the code you wrote ! thanks...

Post Reply