Database Modelling with XgeneCloud's API framework is done via a GUI database client which is much like
MySQL workbench / PG Admin / SQL Server studio etc.
This means there is no need to read a tonne of documentation on how to
create a table or a foreign key or adding a complex index to table.
Just point and click.
- There will be a timestamp.up.sql and timestamp.down.sql files that will be created under folder ./server/tool/primary/migrations
- .up.sql file will have the SQL change done to database and this change can be easily applied to other environments
- .down.sql file will have the reverse schema migration change. For eg : If you created a table - .down.sql file will have delete table statement
Scaffold Code on Save
If Scaffold code on save is enabled - any change done to schema will get result in a scaffolding of respective source code
- On new table creation : model files, router files, service files will be generated
- On table edit : model files will be regenerated and the orginial file will be backed up with a timestamp
- On table delete : we don't change any source code as of now
Models are kept under
/server/models/primary folder. Where model files
.model.js and meta files suffixed with
For more about Model API click here .
Scaffolding On Change
Subscribe to Our Newsletter
Let us stretch your imagination