
10/4/2022
What this post added
This post details an investigation into the safety of adding NOT NULL columns to MySQL tables using the Large Hadron Migrator (LHM) gem. It outlines the LHM shadow-table mechanism and defines schema change safety based on backward compatibility and data loss prevention. The investigation focuses on the impact of DEFAULT values, UNIQUE indexes, and MySQL's strict/non-strict modes on the safety of adding NOT NULL columns. A matrix of results is presented, concluding that adding NOT NULL columns without DEFAULT values is risky, and UNIQUE indexes require extreme caution due to potential data loss.