schema.rst
This file
Path
docs/tutorial/schema.rst
21 lines · 735 bytes
Last changed by
New style for the documentation. Looks more like the website now.Armin Ronacherbefore adoptionbcf347f
History of this fileTake it
1Step 1: Database Schema2=======================34First we want to create the database schema. For this application only a5single table is needed and we only want to support SQLite so that is quite6easy. Just put the following contents into a file named `schema.sql` in7the just created `flaskr` folder:89.. sourcecode:: sql1011 drop table if exists entries;12 create table entries (13 id integer primary key autoincrement,14 title string not null,15 text string not null16 );1718This schema consists of a single table called `entries` and each row in19this table has an `id`, a `title` and a `text`. The `id` is an20automatically incrementing integer and a primary key, the other two are21strings that must not be null.