0Pricing
Flask Academy · Lesson

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

  1. Install and Configure the Extension
  2. Define Your First Model Class
  3. Columns, Types, and Constraints
  4. Create the Schema with create_all
← Back to Flask Academy