Skip to content

Latest commit

 

History

History
6 lines (4 loc) · 559 Bytes

schema-migrations.md

File metadata and controls

6 lines (4 loc) · 559 Bytes

Schema Migrations

I would use migration scripts which would be tracked in the version control system. Each change to database schema would be a script ordered chronologically, e.g. they would be named 1_add_age_to_user, 2_add_price_to_order.
I would also track in database which migration scripts were executed already. With setup like this, it would be easy to execute migration scripts automatically - in development environment on application start, and in CI - before deployment.