18. Migration based
v1 v2
Non rileva conflitti
L’ordine è cruciale
State based
v1 v2
Non riconosce i rename
Azzera eventuali
differenze
I due paradigmi
20. Migration based
v1 v2
Tante versioni in
esercizio
• On-premises
• Clients
State based
v1 v2
Una sola versione in
produzione
• On-line services
I due paradigmi
22. Unit testing
tSQLt
Open source database Unit Testing
framework for SQL Server
https://tsqlt.org/
DbUnit
JUnit extension
http://www.dbunit.org/
NDbUnit2
.NET library for managing database state
during unit testing
https://github.com/savornicesei/NDbUnit
2
DbFit
Fitness style (Java+Jdbc)
http://dbfit.github.io/dbfit/
Respawn
Intelligent database cleaner for
integration tests
https://github.com/jbogard/Respawn
27. Database Refactoring Cycle
Initial state Final state
Implement the refactoring
Test on non-production
Refactoring completed
deploy new schema,
migrate data
deploy new application version
29. Database Refactoring Cycle
Initial state Final state
Implement the refactoring
Test on non-production
Refactoring completed
deploy new schema,
migrate data
deploy new application version
31. Database Refactoring Cycle
Initial state Final state
Transitional state
Implement the refactoring
Test on non-production
Refactoring completed
All systems use the new schema
Coexistence of
old and new schema
Expand:
deploy new schema,
migrate data,
add scaffolding code
Contract:
Drop old schema objects
and scaffolding code
32. Elementi Chiave
In input solo sorgenti
Pacchetti (es. dacpac) vanno in un Artifact Store
e devono essere il risultato di una build
Istanze di database per la build
Ad ogni Branch la sua Istanza
Gestione delle credenziali
37. Bibliografia: Articoli
Schema migration
Evolutionary Database Design
100% Online Deployments
Blue-Turquoise-Green
Deployment
ALTER MySQL tables without
locking them
Automated blue/green
database deployments
Blue-Green Deployment on
AWS with Database
Synchronisation
39. Grazie e attendo le vostre domande
Giulio Vian
Senior DevOps Engineer, Unum
Il contenuto della presentazione ha carattere
didattico. Ogni sforzo è stato fatto per risalire agli
autori delle immagini impiegate. In caso di errori od
omissioni, vi chiediamo di segnalarli per procedere
alle correzioni.
Notas do Editor
10,000+ employees (1,000+ in IT)
~$12 billion Revenue
General Data Protection Regulation
California Consumer Privacy Act
…
Giovanni Francesco Barbieri detto il Guercino (1591-1666)Atlante che sostiene il globo celeste, 1646Firenze, Museo Mozzi Bardini, inv. MCF-MB 1922-1148.a
Il mito del titano Atlante condannato da Zeus a sorreggere la volta celeste per l’eternità ebbe notevole fortuna iconografica nel corso del Seicento. Tra le opere più famose è questa versione, dipinta per Lorenzo de’ Medici.