Redgate Flyway

For PostgreSQL users - where are your DBs hosted?

Static data

EDITION: TEAMS

Static data is also referred to as reference data, configuration data, or lookup data. It's usually small sets of data that should be tracked in version control and needs to be deployed alongside the database schema changes and application changes for the application to run correctly.  Popular examples are data such as Countries, U.S. States, or even application settings.

Tracking static data as part of the database schema

Configure the relevant tables to track static data, and data differences will show up alongside schema differences. This can be done through Flyway Desktop, or by manually configuring the tables in the TOML configuration file, using the staticDataTables setting.

For more information, see Handling data.

Other approaches to static data

The default approach to static data scripts the data out as individual INSERT statements. This works well for small data.  It can be unwieldy if you are dealing with a large amount of static data. There are alternative approaches available to solve this, e.g.:

  • Using repeatable migrations to manage data

  • Using script migrations to manage data

  • Using Redgate's Data Compare technology to version control and generate migration scripts 

For more information, see Handling data.



EDITION: ENTERPRISE

The following static data capabilities are reserved for Flyway Enterprise:

  • Customize the static data comparison options
  • Filter the static data columns to include in version control and in generated migration scripts


We are considering adding the ability to filter the static data rows to include in version control and generated migration scripts by allowing you to specify a WHERE clause.  If this is something you are interested in seeing, please vote on our UserVoice site.  If you need this feature now, Flyway Enterprise comes with SQL Data Compare and Data Compare for Oracle, which both have command lines and docker containers.


Didn't find what you were looking for?