Skip to content
Myr

schema.rst

This file

Path

docs/tutorial/schema.rst

25 lines · 814 bytes

Last changed by

Rewrapped linesArmin Ronacherbefore adoptionafd3c45

History of this file

Take it

The walk stopped after 200 commits: lines older than 22af78a point at it.

Removed outdated sentence in the testing docsArmin Ronacherbefore adoption22af78a

lines 1–5why, one step back
1.. _tutorial-schema:
23Step 1: Database Schema4=======================5

Rewrapped linesArmin Ronacherbefore adoptionafd3c45

lines 6–9why, one step back
6First we want to create the database schema. Only a single table is needed
7for this application and we only want to support SQLite so creating the8database schema is quite easy. Just put the following contents into a file9named `schema.sql` in the just created `flaskr` folder:

Removed outdated sentence in the testing docsArmin Ronacherbefore adoption22af78a

lines 10–15why, one step back
10
11.. sourcecode:: sql1213 drop table if exists entries;14 create table entries (15 id integer primary key autoincrement,

Merge pull request #655 from oliversong/masterArmin Ronacherbefore adoptionab3d9d1

lines 16–17why, one step back
16 title text not null,
17 text text not null

Removed outdated sentence in the testing docsArmin Ronacherbefore adoption22af78a

lines 18–25why, one step back
18 );
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.2425Continue with :ref:`tutorial-setup`.