Database migrations without down time (V2:PHP:DPC)
Transcript of Database migrations without down time (V2:PHP:DPC)
![Page 1: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/1.jpg)
DATABASE MIGRATIONSWITHOUT DOWN TIME
MICHIEL ROOK
@michieltcs
![Page 2: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/2.jpg)
▸ Developer, consultant, trainer, speaker
▸ @michieltcs
![Page 3: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/3.jpg)
ABOUT DATABASE MIGRATIONS
![Page 4: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/4.jpg)
ABOUT SCHEMA MIGRATIONS
![Page 5: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/5.jpg)
SQL
![Page 6: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/6.jpg)
@michieltcs
UP
![Page 7: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/7.jpg)
@michieltcs
UP DOWN
![Page 8: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/8.jpg)
DOCTRINE
@michieltcs
class Version20170228150619 extends AbstractMigration { public function up(Schema $schema) { $this->addSql('CREATE TABLE addresses (id INT NOT NULL, street VARCHAR(255) NOT NULL, PRIMARY KEY(id))'); } public function down(Schema $schema) { $this->addSql('DROP TABLE addresses'); } }
![Page 9: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/9.jpg)
DOCTRINE
@michieltcs
mysql> select * from migration_versions; +----------------+ | version | +----------------+ | 20170228150619 | +----------------+ 1 row in set (0,00 sec)
![Page 10: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/10.jpg)
FLYWAY
@michieltcs
V20170228150619-create_addresses_table.sqlCREATE TABLE addresses (id INT NOT NULL, street VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
![Page 11: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/11.jpg)
FLYWAY
@michieltcs
mysql> select * from schema_version; +----------------+----------------+------------------------+----------+---------------------------------------------+------------+--------------+---------------------+----------------+---------+ | installed_rank | version | description | type | script | checksum | installed_by | installed_on | execution_time | success | +----------------+----------------+------------------------+----------+---------------------------------------------+------------+--------------+---------------------+----------------+---------+ | 1 | 1 | << Flyway Baseline >> | BASELINE | << Flyway Baseline >> | NULL | migrations_1 | 2017-02-28 16:27:21 | 0 | 1 | | 2 | 20170228150619 | create addresses table | SQL | V20170228150619__create-addresses-table.sql | 1789629568 | migrations_1 | 2017-02-28 16:27:21 | 16 | 1 | +----------------+----------------+------------------------+----------+---------------------------------------------+------------+--------------+---------------------+----------------+---------+ 2 rows in set (0,00 sec)
+------------+--------------+---------------------+----------------+---------+ | checksum | installed_by | installed_on | execution_time | success | +------------+--------------+---------------------+----------------+---------+ | NULL | migrations_1 | 2017-02-28 16:27:21 | 0 | 1 | | 1789629568 | migrations_1 | 2017-02-28 16:27:21 | 16 | 1 | +------------+--------------+---------------------+----------------+---------+
![Page 12: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/12.jpg)
TRANSACTIONS?
![Page 13: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/13.jpg)
ROLLBACKS?
![Page 14: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/14.jpg)
@michieltcs
DESTRUCTIVE CHANGES
1
![Page 15: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/15.jpg)
@michieltcs
DESTRUCTIVE CHANGES
1 LONG-LIVED LOCKS
![Page 16: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/16.jpg)
@michieltcs
DESTRUCTIVE CHANGES
1 LONG-LIVED LOCKS
RENAMES
![Page 17: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/17.jpg)
@michieltcs
DESTRUCTIVE CHANGES
1 LONG-LIVED LOCKS
RENAMES
DELETES
![Page 18: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/18.jpg)
@michieltcs
DESTRUCTIVE CHANGES
IMPLICIT COMMITS
1 2
![Page 19: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/19.jpg)
@michieltcs
DESTRUCTIVE CHANGES
IMPLICIT COMMITS
SHARDING
1 2 3
![Page 20: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/20.jpg)
@michieltcs
DESTRUCTIVE CHANGES
IMPLICIT COMMITS
SHARDING MULTIPLE DATABASES
1 2 3 4
![Page 21: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/21.jpg)
ROLLBACKS
![Page 22: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/22.jpg)
DOWNTIME?
![Page 23: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/23.jpg)
@michieltcs
CREATE PACKAGE
![Page 24: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/24.jpg)
@michieltcs
CREATE PACKAGE
SHUT DOWN APPLICATION
![Page 25: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/25.jpg)
@michieltcs
CREATE PACKAGE
SHUT DOWN APPLICATION
RUN MIGRATION
![Page 26: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/26.jpg)
@michieltcs
CREATE PACKAGE
SHUT DOWN APPLICATION
RUN MIGRATION
DEPLOY PACKAGE
![Page 27: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/27.jpg)
@michieltcs
CREATE PACKAGE
SHUT DOWN APPLICATION
RUN MIGRATION
DEPLOY PACKAGE
RUN APPLICATION
![Page 28: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/28.jpg)
DOWNTIME?
![Page 29: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/29.jpg)
DOWNTIME
![Page 30: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/30.jpg)
NO MIGRATIONS!
![Page 31: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/31.jpg)
DOWNTIME
![Page 32: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/32.jpg)
ZERO DOWNTIME DEPLOYMENT
@michieltcs
LOAD BALANCER
APP V1
![Page 33: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/33.jpg)
@michieltcs
LOAD BALANCER
APP V1 APP V2
ZERO DOWNTIME DEPLOYMENT
![Page 34: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/34.jpg)
@michieltcs
LOAD BALANCER
APP V2
ZERO DOWNTIME DEPLOYMENT
![Page 35: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/35.jpg)
DATABASE STATE?
![Page 36: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/36.jpg)
DATABASE VERSION
@michieltcs
LOAD BALANCER
APP V1
DATABASE V1
expects v1
![Page 37: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/37.jpg)
@michieltcs
LOAD BALANCER
APP V1
DATABASE V2
expects v1
DATABASE VERSION
![Page 38: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/38.jpg)
@michieltcs
LOAD BALANCER
APP V1 APP V2
DATABASE V2
expects v1 expects v2
DATABASE VERSION
![Page 39: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/39.jpg)
OLD APPSHOULD WORK WITH
NEW STATE
![Page 40: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/40.jpg)
DECOUPLE
![Page 41: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/41.jpg)
MIGRATION DECOUPLE
DEPLOYMENT
![Page 42: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/42.jpg)
EXPAND - CONTRACT
![Page 43: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/43.jpg)
BACKWARDS COMPATIBILITY
![Page 44: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/44.jpg)
CLIENT
EXISTING API
@michieltcs
CLIENT
CLIENT
![Page 45: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/45.jpg)
CLIENT
EXISTING API
@michieltcs
CLIENT
CLIENT
NEWAPI
![Page 46: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/46.jpg)
DEPRECATION
![Page 47: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/47.jpg)
CLIENT
EXISTING API
@michieltcs
CLIENT
CLIENT
NEWAPI
![Page 48: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/48.jpg)
CLIENT
EXISTING API
@michieltcs
CLIENT
CLIENT
NEWAPI
![Page 49: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/49.jpg)
CLIENT
EXISTING API
@michieltcs
CLIENT
CLIENT
NEWAPI
![Page 50: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/50.jpg)
CLIENT
@michieltcs
CLIENT
CLIENT
NEWAPI
![Page 51: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/51.jpg)
NON-DESTRUCTIVE CHANGES
![Page 52: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/52.jpg)
@michieltcs
ADDING TABLES
![Page 53: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/53.jpg)
@michieltcs
ADDING TABLES
ADDING COLUMNS
![Page 54: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/54.jpg)
@michieltcs
ADDING TABLES
ADDING COLUMNS
CREATING INDEXES
![Page 55: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/55.jpg)
@michieltcs
ADDING TABLES
ADDING COLUMNS
CREATING INDEXES
sometimes ...
![Page 56: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/56.jpg)
ONE DIFF BACK
![Page 57: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/57.jpg)
EXAMPLE: RENAMING A COLUMN
![Page 58: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/58.jpg)
@michieltcs
CREATE COLUMN WITH
NEW NAME
1
![Page 59: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/59.jpg)
@michieltcs
CREATE COLUMN WITH
NEW NAME
WRITE TO OLD & NEW
COLUMNS
1 2
![Page 60: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/60.jpg)
@michieltcs
CREATE COLUMN WITH
NEW NAME
WRITE TO OLD & NEW
COLUMNS
MIGRATE OLD RECORDS
1 2 3
![Page 61: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/61.jpg)
@michieltcs
CREATE COLUMN WITH
NEW NAME
WRITE TO OLD & NEW
COLUMNS
MIGRATE OLD RECORDS
READ FROM NEW COLUMN
1 2 3 4
![Page 62: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/62.jpg)
@michieltcs
CREATE COLUMN WITH
NEW NAME
WRITE TO OLD & NEW
COLUMNS
MIGRATE OLD RECORDS
READ FROM NEW COLUMN
1 2 3 4
remove old column and
code
![Page 63: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/63.jpg)
![Page 64: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/64.jpg)
FEATURE TOGGLES
![Page 65: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/65.jpg)
@michieltcs
ENABLE/DISABLE FEATURES
![Page 66: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/66.jpg)
@michieltcs
ALTERNATIVE CODE PATHS
ENABLE/DISABLE FEATURES
![Page 67: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/67.jpg)
@michieltcs
ALTERNATIVE CODE PATHS
ENABLE/DISABLE FEATURES
AT RUNTIME
![Page 68: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/68.jpg)
![Page 69: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/69.jpg)
@michieltcs
CREATE COLUMN WITH
NEW NAME
WRITE TO OLD & NEW
COLUMNS
MIGRATE OLD RECORDS
READ FROM NEW COLUMN
1 2 3 4
feature toggle feature toggle
![Page 70: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/70.jpg)
NOSQL
![Page 71: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/71.jpg)
NO SCHEMA
![Page 72: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/72.jpg)
MIGRATE DURING READ
![Page 73: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/73.jpg)
BACKGROUND MIGRATION
![Page 74: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/74.jpg)
NO DOWNTIME
![Page 75: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/75.jpg)
LARGE DATASETS
![Page 76: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/76.jpg)
LONG MIGRATIONS
![Page 77: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/77.jpg)
LONG MIGRATIONS
LONG RUNNING QUERIES
![Page 78: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/78.jpg)
LONG MIGRATIONS
MEMORY USAGELONG RUNNING QUERIES
![Page 79: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/79.jpg)
LONG MIGRATIONS
FAILURES
MEMORY USAGELONG RUNNING QUERIES
![Page 80: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/80.jpg)
LONG MIGRATIONS
FAILURES
MEMORY USAGE
RESTARTING, RESUMING
LONG RUNNING QUERIES
![Page 81: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/81.jpg)
LONG MIGRATIONS
FAILURES
MEMORY USAGE
RESTARTING, RESUMING
LOGGING & PROGRESS
LONG RUNNING QUERIES
![Page 82: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/82.jpg)
QUEUES
![Page 83: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/83.jpg)
@michieltcs
UI
Data Layer
Database
messagesqueries DTOs
@michieltcs
Queue
Backend
messages
![Page 84: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/84.jpg)
@michieltcs
UI
Data Layer
Database
messagesqueries DTOs
@michieltcs
Queue
Backend
messages
![Page 85: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/85.jpg)
CQRS
![Page 86: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/86.jpg)
COMMAND QUERY RESPONSIBILITY SEGREGATION
![Page 87: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/87.jpg)
SEPARATEREADS FROM WRITES
![Page 88: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/88.jpg)
@michieltcs
UI
Event Handlers
CommandsData Layer
Database Database
updates
events
queries DTOs
Repository
@michieltcs
Database
![Page 89: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/89.jpg)
TOOLS
![Page 90: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/90.jpg)
@michieltcs
![Page 91: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/91.jpg)
RECAP
![Page 92: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/92.jpg)
MULTIPLE STEPS
![Page 93: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/93.jpg)
NO BREAKING CHANGES
![Page 94: Database migrations without down time (V2:PHP:DPC)](https://reader033.fdocuments.us/reader033/viewer/2022061523/629f34332197177f0903b4b5/html5/thumbnails/94.jpg)
LITERATURE
databaserefactoring.com
github.com/barsoom/devbook/