Posts by
Phil Factor
Phil Factor

Phil Factor (real name withheld to protect the guilty), aka Database Mole, has 30 years of experience with database-intensive applications. Despite 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. He is a regular contributor to <strong><a href="http://www.simple-talk.com/" target="_blank" rel="noopener">Simple Talk</a></strong> and <strong><a href="http://www.sqlservercentral.com/" target="_blank" rel="noopener">SQLServerCentral</a></strong>.

Phil Factor

Phil Factor

20 December 2021

Phil Factor

Phil Factor

20 December 2021

Testing a Flyway Database Migration

Often, we want to test the new version of a database, produced by a Flyway migration, before committing the new migration file, or to test the same migration run on a number of different databases. This article demonstrates how to do it, by generating and using JSON parameter files to… Read more
Phil Factor

Phil Factor

10 December 2021

Phil Factor

Phil Factor

10 December 2021

Exploring the Flyway Schema History Table

Flyway uses a schema history table to track the version of each database, recording in it every versioned migration file applied to build that version. It's worth understanding exactly how Flyway uses this table, the possible dangers of moving it to a non-default location and how to do it safely,… Read more
Phil Factor

Phil Factor

24 November 2021

Phil Factor

Phil Factor

24 November 2021

Automating Flyway Undos

How to auto-generate first-cut undo scripts for every Flyway migration. For every new version of a database created by a Flyway versioned migration, we compare it to a 'source' directory containing object-level build scripts for the previous version. The SQL Compare engine does the rest, producing the associated undo script… Read more
Phil Factor

Phil Factor

19 November 2021

Phil Factor

Phil Factor

19 November 2021

Exploring Auto-fix in SQL Code Analysis

Phil Factor presents a useful but slightly flawed 'table report' script as an adventure playground for exploring SQL Code analysis issues. He demonstrates use of the auto-fix feature, to arrive at a pristine script free from wavy green underlines. Read more
Phil Factor

Phil Factor

15 November 2021

Phil Factor

Phil Factor

15 November 2021

Bulk Loading Data via a PowerShell Script in Flyway

The test data management strategy for any RDBMS needs to include a fast, automated way of allowing developers to "build-and-fill" multiple copies of any version of the database, for ad-hoc or automated testing. The technique presented in this article uses a baseline migration script to create the empty database at… Read more