# sqlite3.IntegrityError: NOT NULL constraint failed: table.column

**Code:** `SQLite NOT NULL failed` · **Category:** SQL · **Seen on:** SQL

A NULL went into a NOT NULL column in SQLite.

## Meaning

Often an ORM model field not set, or a new NOT NULL column without a default in a Django/Rails migration.

## Common causes

- Required field missing
- Migration added NOT NULL without default
- Explicit None/null

## Quick fix

1. Provide the value or a default
2. Make the column nullable if appropriate

## Detailed fix by platform

### SQL

1. `ALTER TABLE users ADD COLUMN status TEXT NOT NULL DEFAULT 'active';`

## How to diagnose

1. **Column** — Which one?
2. **Input** — Why null?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/sql/sqlite-not-null-constraint-failed)
