

The default Schemaįlyway always puts the flyway_schema_history table in the default schema. This can be done as an environment variable, a configuration file setting or a parameter. You can place the schema table anywhere you like, just by changing a couple of configuration items. It is fine in SQL Server or PostgreSQL, for example, but not in MySQL or SQLite.įlyway is, as always, very accommodating. The problem with putting it in a different schema is in the differing ways that databases support schemas. On most database systems, you can place the flyway_schema_history table in a different schema. Generally, you can tell any utility tool that you’re using, such as SQL Compare, to ignore certain tables, so it is just a matter to setting every tool you use accordingly. It can complicate any static source control system that you’re using. As this schema history table records the state of the database, this isn’t necessarily a bad thing, but the table isn’t really part of the database. Locating the flyway_schema_history tableĪlthough the default schema is by far the simplest place to store Flyway’s metadata table, you have the complication that if you need to generate a script of the contents of the database, such as when you create a build script, or object-level scripts, these will then include this table, unless you explicitly exclude it. If you need to alter the contents of the table, it is almost always possible to do so via a Flyway action. This information can be obtained as a JSON file by setting the command-line parameter accordingly with - outputType=json. It is best to read the information contained in the table by using Flyway Info.
#Ow to check the back history in dbvisualizer update
It is a bad idea to edit or update it directly. The flyway_schema_history table is exclusively for use by Flyway.


Flyway always puts this table in the default schema. To do this, it needs to keep all the information required within the database, in a bookkeeping table called the flyway_schema_history table. Once applied, it won’t let you alter them subsequently. How Flyway uses the Schema History tableįlyway tracks the version of each database since it knows exactly which versioned migration files were applied to build each version. He is a regular contributor to Simple Talk and SQLServerCentral. Phil Factor (real name withheld to protect the guilty), aka Database Mole, has 30 years of experience with database-intensive applications.ĭespite having once been shouted at by a furious Bill Gates at an exhibition in the early 1980s, he has remained resolutely anonymous throughout his career.
