Database migrations (canje-canjen schema) yana ɗaya daga cikin sarƙa-sarƙan sak CI/CD — ba kamar stateless application code ba, databases na riƙe da state wanda ba zai iya mai sauke sauƙo ko maida ba. Sarrafa migrations a tanaɗi (automation, backward compatibility, tsarin nan-naba) yana dace a gida don ainihi deployments.
Yagasa database migrations tare da wahala
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.
