schema.rst
This file
Path
docs/tutorial/schema.rst
25 lines · 825 bytes
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than 9a61e7d point at it.
Merge remote-tracking branch 'sourya/master'Markus Unterwaditzerbefore adoption9a61e7d
lines 1–25why, one step back1.. _tutorial-schema:23Step 1: Database Schema4=======================56First, we want to create the database schema. Only a single table is needed7for 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:1011.. sourcecode:: sql1213 drop table if exists entries;14 create table entries (15 id integer primary key autoincrement,16 title text not null,17 'text' text not null18 );1920This schema consists of a single table called ``entries``. 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`.