When it comes to forward engineering in our data modeling tools, it’s about generating the resulting script for the selected target platform.
In the case of relational databases such as PostgreSQL, MariaDB, MySQL or SQLite, it is the resulting SQL script. For MongoDB it is possible to generate a schema validation script and for platforms like Mongoose or GraphQL it is schema definition scripts.
How to generate the script?
To generate a script from your project click the Script icon on the main toolbar. The preview of the script appears in a modal form. Click Save Scripts and select a location where the files should be stored. Option Overwrite existing files allows you to ignore existing scripts and overwrite them without getting a warning.
For relational databases PostgreSQL, MariaDB, MySQL or SQLite it is possible to set options in Luna Modeler for generating the resulting SQL script.
The order of objects can be changed on the Order Items tab. We plan to improve this functionality in future versions and make it more user-friendly, however, even in this version it is possible to move the selected object higher or lower using drag and drop.
It is also possible to automatically reorder objects by clicking the Reset order button, when dependencies are analyzed and items are automatically reordered. This feature is most beneficial in PostgreSQL projects.
Generate options for Auto-generated scripts and Custom code
If you have an object in progress and do not want to generate the resulting script for it, turn off the Generate option. And if you need to generate other code, you can enter it in the Custom Code field and use the Generate switch below that field. This way you can get better control over the generated script for the entire data model or diagram.
How to run the generated script?
For this you will need another tool. Luna Modeler is a data modeling and reporting tool. So it is used for data modeling, not for running scripts for now.