# Safely Adding NOT NULL Columns to Your Database Tables

DevFeed: [Safely Adding NOT NULL Columns to Your Database Tables](<https://devfeed.tech/articles/safely-adding-not-null-columns-to-your-database-tables-1288.md>)

Original publisher: [Read original article](<https://shopify.engineering/add-not-null-colums-to-database>)

Author: Sinclert Pérez

Published: 2022-10-04T15:00:00Z

Content type: article

Language: en

Sources: [Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering.md>), [Shopify Engineering - Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering-shopify-engineering.md>)

Topics: [MySQL](<https://devfeed.tech/topics/mysql.md>), [migration](<https://devfeed.tech/topics/migration.md>), [schema-evolution](<https://devfeed.tech/topics/schema-evolution.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [Structured-data](<https://devfeed.tech/topics/structured-data.md>)

Tags: [compatibility](<https://devfeed.tech/tags/compatibility.md>), [database](<https://devfeed.tech/tags/database.md>), [databases](<https://devfeed.tech/tags/databases.md>), [migration](<https://devfeed.tech/tags/migration.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [shopify](<https://devfeed.tech/tags/shopify.md>)

## AI overview

This article presents recommendations for safely adding NOT NULL columns to MySQL database tables. It explains how Shopify's Database Migrations team investigated schema-change safety using the Large Hadron Migrator (LHM) gem and its shadow-table migration process.

## Source excerpt

Recommendations from Shopify's Data Migrations team for adding NOT NULL columns safely to your own database tables, based on a recent investigation into schema change safety using using the popular Large Hadron Migrator (LHM) gem.