schema.rst
This file
Path
docs/tutorial/schema.rst
25 lines · 795 bytes
Last changed by
Added lazyloading pattern and explicit chapter links in tutorial.Armin Ronacherbefore adoption9d19b77
History of this fileTake it
Added lazyloading pattern and explicit chapter links in tutorial.Armin Ronacherbefore adoption9d19b77
lines 1–2why, one step back1.. _tutorial-schema:2New style for the documentation. Looks more like the website now.Armin Ronacherbefore adoptionbcf347f
lines 3–23why, one step back3Step 1: Database Schema4=======================56First we want to create the database schema. For this application only a7single table is needed and we only want to support SQLite so that is quite8easy. Just put the following contents into a file named `schema.sql` in9the just created `flaskr` folder:1011.. sourcecode:: sql1213 drop table if exists entries;14 create table entries (15 id integer primary key autoincrement,16 title string not null,17 text string not null18 );1920This schema consists of a single table called `entries` and each row in21this table has an `id`, a `title` and a `text`. The `id` is an22automatically incrementing integer and a primary key, the other two are23strings that must not be null.Added lazyloading pattern and explicit chapter links in tutorial.Armin Ronacherbefore adoption9d19b77
lines 24–25why, one step back2425Continue with :ref:`tutorial-setup`.