Canonical pattern for dropping constraints or changing types.
Section: Change schemas safely
Rebuild a table for complex changes
sql
sql
BEGIN;
CREATE TABLE users_new (
id INTEGER PRIMARY KEY,
email TEXT NOT NULL UNIQUE,
full_name TEXT,
timezone TEXT
);
INSERT INTO users_new (id, email, full_name, timezone)
SELECT id, email, display_name, timezone FROM users;
DROP TABLE users;
ALTER TABLE users_new RENAME TO users;
COMMIT;Explanation
SQLite supports many schema changes, but rebuilds are still the practical pattern for more invasive migrations.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Change schemas safely