schema.rst
This file
Path
docs/tutorial/schema.rst
25 lines · 806 bytes
Last changed by
Merge branch '0.11-maintenance'David Lordbefore adoption633b13e
History of this fileTake it
The walk stopped after 200 commits: lines older than 2644d69 point at it.
Merge pull request #1853 from hyunchel/feature/issue-1773-add-issue-templateJeff Widmanbefore adoption2644d69
lines 1–5why, one step back1.. _tutorial-schema:23Step 1: Database Schema4=======================5Merge branch '0.11-maintenance'David Lordbefore adoption633b13e
lines 6–9why, one step back6In this step, you will create the database schema. Only a single table is7needed for this application and it will only support SQLite. All you need to do8is put the following contents into a file named :file:`schema.sql` in the9:file:`flaskr/flaskr` folder:Merge pull request #1853 from hyunchel/feature/issue-1773-add-issue-templateJeff Widmanbefore adoption2644d69
lines 10–19why, one step back1011.. 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 );19Merge branch '0.11-maintenance'David Lordbefore adoption633b13e
line 20why, one step back20This schema consists of a single table called ``entries``. Each row inMerge pull request #1853 from hyunchel/feature/issue-1773-add-issue-templateJeff Widmanbefore adoption2644d69
lines 21–25why, one step back21this 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`.