SchemaDrift
Paste two versions of a database schema. See what changed and which changes will break running code.
BREAKING
6 breaking
2 review
7 safe
breaking
Table legacy_audit was dropped. Code reading or writing it will fail.
table_removed
table_removed
breaking
orders.notes is now NOT NULL. Existing NULLs and old writes will fail.
nullability_tightened · NULL → NOT NULL
nullability_tightened · NULL → NOT NULL
breaking
orders.total type decimal(10,2) -> decimal(8,2) (precision or scale reduced).
type_changed · decimal(10,2) → decimal(8,2)
type_changed · decimal(10,2) → decimal(8,2)
breaking
Column users.tenant_id is NOT NULL with no default. Existing rows and old INSERTs will fail.
column_added_required · - → int
column_added_required · - → int
breaking
Column users.name was dropped. Possible rename to full_name; a rename is still breaking for old code.
column_removed · varchar(80) → -
column_removed · varchar(80) → -
breaking
Unique constraint uq_users_email on users(email) added. Existing duplicate rows will block the migration.
unique_added
unique_added
warning
orders.status lost its default ('new'). Inserts that omit it may fail.
default_removed · 'new' → -
default_removed · 'new' → -
warning
Index idx_orders_user on orders(user_id) removed. Queries may slow down.
index_removed
index_removed
safe
New table invoices added.
table_added
table_added
safe
Column orders.currency (char(3)) added.
column_added · - → char(3)
column_added · - → char(3)
safe
orders.id type int -> bigint (integer widened).
type_changed · int → bigint
type_changed · int → bigint
safe
Column users.full_name (varchar(80)) added.
column_added · - → varchar(80)
column_added · - → varchar(80)
safe
Column users.phone (varchar(20)) added.
column_added · - → varchar(20)
column_added · - → varchar(20)
safe
users.age type smallint -> int (integer widened).
type_changed · smallint → int
type_changed · smallint → int
safe
users.email type varchar(100) -> varchar(255) (length increased).
type_changed · varchar(100) → varchar(255)
type_changed · varchar(100) → varchar(255)