Creating and Changing Tables: Migrations

Migrations are numbered SQL scripts that create and change an API's tables, run in order when the app starts, with SQLite's PRAGMA user_version remembering how many a database has had, so every copy of the database gets each change exactly once.

By

Updated

Cheat sheet: Creating and Changing Tables: Migrations
Category
FastAPI
Level
Journeyman
Tags
Database Migration, fastapi, Lifespan Events, PRAGMA, rest-api, Schema (database)