Create the Schema with create_all
Generate tables from your model definitions.
From Models to Tables
Your models describe tables, but the database file is still empty. You need one step to turn declarations into real tables. 🏗️
Meet create_all
db.create_all() scans every model it knows and issues the CREATE TABLE statements for you. One call builds the whole schema.
db.create_all()All lessons in this course
- Install and Configure the Extension
- Define Your First Model Class
- Columns, Types, and Constraints
- Create the Schema with create_all