Child pages
  • Metada data import
Skip to end of metadata
Go to start of metadata

In Servoy 6.1, support is added for maintaining system data in the solution export.
Data stored in tables that are marked as meta tables will be included in the export file, when the file is imported in the application server, the meta data will be merged with the existing data.

Mark tables for meta data

In the table editor, properties tab, the table can be marked for meta data.
Requirements for meta data tables are:

  • pk is UUID column
  • it has a date field called modification_date
  • it has a date field called deletion_date

This is needed for data merging when importing the solution.

Maintaining meta data

The meta data is maintained by the developer in the development database.
The table entry in the solution explorer tree has a context menu item 'Update Meta Data' to overwrite meta data in the table with data stored in the workspace.
Data from the table can be saved in the workspace file or data saved from the workspace file can be loaded into the table.

The workspace file that contains the data will be stored in the resources project of the active solution.

When meta data is copied from database to workspace file, the workspace file gets overwritten.
When meta data is copied from workspace file to database table, all data in the database table will be deleted and the table will be filled with the workspace data.

Exporting meta data.

The solution export dialog has an option (default on) to include meta data in the export file.
The data from the workspace file will be included in the export file.
By default, data in the database table will be compared with data in the export file during export, this can be skipped via an option in the export dialog.

Importing meta data in Developer

In developer, the meta data will be saved in the workspace file.
When the table is empty (or has just been created), it will also be inserted in the database table.

Importing meta data in Application Server

In Application Server import, existing meta data will be merged with meta data from the import file:

  • import data with non-null deletion_date will be deleted
  • new records will be inserted
  • import data with modification_date after modification_date of existing data (or equal) will be updated
  • if existing data has a null modification_date and the import data has a modification date, the data will be updated

When a record has non-null modification_date and the import data has null modification_date, the record will not be updated.
Same when the record has modification_date after import metadata modification_date.

Meta data version management

The meta data will be stored in the resources project of the active solution in file //datasources//.data
This file can be version-managed with any file-based VMS (like svn/git), the Servoy Team Provider does not support meta data.

  • No labels