Advanced System Design Fundamentals
Vote

0% completed

​

Exercise: Migrating a Live Payments Table

1. The Table, and What Has to Change

A payments service has one table that has been in production for four years. It holds eleven million rows, takes roughly four hundred writes a second at peak, and every row in it is money that somebody will eventually audit.

CREATE TABLE payments ( id BIGSERIAL PRIMARY KEY, account_id BIGINT NOT NULL, amount_cents INTEGER NOT NULL, status VARCHAR(32) NOT NULL, card_last4 VARCHAR(4), card_brand VARCHAR(32), created_at TIMESTAMPTZ NOT NULL );

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content