From 1bd85787ecacc587073d64bb7a922e0aad7a604e Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sun, 27 Nov 2005 19:28:38 +0000 Subject: [PATCH] Fixed #933 -- Updated 'django-admin.py sql polls' output in tutorial01. Thanks, jhernandez git-svn-id: http://code.djangoproject.com/svn/django/trunk@1465 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/tutorial01.txt | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/docs/tutorial01.txt b/docs/tutorial01.txt index b20e3ce492..5ed5e25bbe 100644 --- a/docs/tutorial01.txt +++ b/docs/tutorial01.txt @@ -227,16 +227,16 @@ Now Django knows myproject includes the polls app. Let's run another command:: You should see the following (the CREATE TABLE SQL statements for the polls app):: BEGIN; - CREATE TABLE polls_polls ( - id serial NOT NULL PRIMARY KEY, - question varchar(200) NOT NULL, - pub_date timestamp with time zone NOT NULL + CREATE TABLE "polls_polls" ( + "id" serial NOT NULL PRIMARY KEY, + "question" varchar(200) NOT NULL, + "pub_date" timestamp with time zone NOT NULL ); - CREATE TABLE polls_choices ( - id serial NOT NULL PRIMARY KEY, - poll_id integer NOT NULL REFERENCES polls_polls (id), - choice varchar(200) NOT NULL, - votes integer NOT NULL + CREATE TABLE "polls_choices" ( + "id" serial NOT NULL PRIMARY KEY, + "poll_id" integer NOT NULL REFERENCES "polls_polls" ("id"), + "choice" varchar(200) NOT NULL, + "votes" integer NOT NULL ); COMMIT; @@ -255,9 +255,10 @@ Note the following: * It's tailored to the database you're using, so database-specific field types such as ``auto_increment`` (MySQL), ``serial`` (PostgreSQL), or ``integer - primary key`` (SQLite) are handled for you automatically. The author of - this tutorial runs PostgreSQL, so the example output is in PostgreSQL - syntax. + primary key`` (SQLite) are handled for you automatically. Same goes for + quoting of field names -- e.g., using double quotes or single quotes. The + author of this tutorial runs PostgreSQL, so the example output is in + PostgreSQL syntax. If you're interested, also run the following commands: