Database migrations (schema changes) என்பது CI/CD-ன் மிகவும் சிக்கலான பகுதிகளில் ஒன்றாகும் — stateless application code போலல்லாமல், databases state-ஐ கொண்டிருக்கின்றன, அவை வெறுமனே மாற்றவோ அல்லது rollback செய்யவோ முடியாது. migrations-ஐ கவனமாக கையாளுதல் (automation, backward compatibility, safe patterns) நம்பகமான deployments-க்கு அவசியமாகும்.
Database migrations ஏன் கடினமாக உள்ளன
App code is stateless (replace it, roll back freely). DATABASES hold STATE:
→ can't just "roll back" a migration that dropped a column or transformed data
(the data may be gone) → rollbacks are risky/impossible for destructive changes
→ during deployment, OLD and NEW app code may run SIMULTANEOUSLY (rolling deploy) —
both must work with the database schema at that moment
→ Schema changes need careful coordination with code deployment.
