# Schema Migrations

> How do you safely apply schema changes to a production database without downtime?

Canonical: https://www.internhack.in/learn/interview/database-design/db-database-migration-best-practices
Last updated: 2026-11-28

Difficulty: Intermediate

## Question

How do you safely apply schema changes to a production database without downtime?

*The full answer is for InternHack members. Open the page link above to read it.*

## Concepts covered

Schema Migration, Expand and Contract, Zero-Downtime Deployment, Lock Timeout, Backward Compatibility

Previous: [Polymorphic Associations](https://www.internhack.in/learn/interview/database-design/db-polymorphic-associations) · Next: [JSONB in SQL](https://www.internhack.in/learn/interview/database-design/db-json-b-data-type) · [All of Database Design](https://www.internhack.in/learn/interview/database-design)

## More Database Design questions

- [UPSERT](https://www.internhack.in/learn/interview/database-design/db-upsert-operation)
- [FK Performance](https://www.internhack.in/learn/interview/database-design/db-foreign-key-performance)
- [Redundancy Risks](https://www.internhack.in/learn/interview/database-design/db-data-redundancy-bad)
- [Graph Databases](https://www.internhack.in/learn/interview/database-design/db-graph-database-use-case)
- [NoSQL Secondary Indexes](https://www.internhack.in/learn/interview/database-design/db-secondary-indexes-nosql)
- [Natural Primary Key](https://www.internhack.in/learn/interview/database-design/db-primary-key-natural)

## Related

- [Learn](https://www.internhack.in/learn)
- [Interview Prep](https://www.internhack.in/learn/interview)
- [Database Design](https://www.internhack.in/learn/interview/database-design)
