Model Relations to Objects
Reads the schema of relational databases and outputs to objects in JSON or Javascript.
-
You want to quickly generate a JSON overview of your database.
-
You want to create HTML docs for your database.
-
You want to backup your database schema and version them.
-
You prefer to define your database with SQL syntax.
-
You already have an existing database and don't want to spend additional time remodelling it in your ORM.
-
If you aren't sure how to define migrations on certain column types in Knex.js
-
If you aren't sure how to model your objects in Objection.js.
-
Why not just try it for fun. It's really easy to use.
$ npx mro
And follow the prompts. Should be pretty straightforward. If something isn't then create an issue.
Just run it where you want the file(s) to be output to.
Examples are based on the example schema
Check out the JSON example output file
Check out the Knex migration example output file Learn More
Check out the Objection examples models folder Learn More
- If you experience bugs
- If you have feature requests
- If you have general comments/feedback
- MySQL
If there is interest this might be done in the future.