The Database scripts page displays automatically generated database initialization and update scripts. The scripts will be saved on disk when you click Save and close or run database update or creation right from this page.
modules/core/db/update
directory. Scripts have autogenerated names
with prefixes that ensure the order of execution.
You can add an arbitrary script by clicking the New update script button, and it will be saved and executed later together with auto-generated scripts.
The newly generated scripts can be edited or completely deleted by clicking the Remove selected button.
If you click Exclude selected, the script will not be saved to the modules/core/db/update
directory, but remembered in the studio-settings.xml
file in your project folder. When you
generate scripts next time, Studio will ignore changes, corresponding to the excluded scripts. This allows
you to have differences between the database and the model entities. For example, you may want to add a
database field to a table, corresponding to a project entity, but do not map it to an entity attribute. When
Studio generates a script to delete the field from the database, just exclude it, and Studio will never
generate it again.
Click Save and close to save all generated scripts. After that, stop the application server if it is running and execute Run > Create database or Run > Update database to apply the scripts.
You can get more information on how to work with database during application development in documentation.