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
This commit is contained in:
Adrian Holovaty 2005-11-27 19:28:38 +00:00
parent 7ff2c879c3
commit 1bd85787ec
1 changed files with 13 additions and 12 deletions

View File

@ -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):: You should see the following (the CREATE TABLE SQL statements for the polls app)::
BEGIN; BEGIN;
CREATE TABLE polls_polls ( CREATE TABLE "polls_polls" (
id serial NOT NULL PRIMARY KEY, "id" serial NOT NULL PRIMARY KEY,
question varchar(200) NOT NULL, "question" varchar(200) NOT NULL,
pub_date timestamp with time zone NOT NULL "pub_date" timestamp with time zone NOT NULL
); );
CREATE TABLE polls_choices ( CREATE TABLE "polls_choices" (
id serial NOT NULL PRIMARY KEY, "id" serial NOT NULL PRIMARY KEY,
poll_id integer NOT NULL REFERENCES polls_polls (id), "poll_id" integer NOT NULL REFERENCES "polls_polls" ("id"),
choice varchar(200) NOT NULL, "choice" varchar(200) NOT NULL,
votes integer NOT NULL "votes" integer NOT NULL
); );
COMMIT; COMMIT;
@ -255,9 +255,10 @@ Note the following:
* It's tailored to the database you're using, so database-specific field types * It's tailored to the database you're using, so database-specific field types
such as ``auto_increment`` (MySQL), ``serial`` (PostgreSQL), or ``integer such as ``auto_increment`` (MySQL), ``serial`` (PostgreSQL), or ``integer
primary key`` (SQLite) are handled for you automatically. The author of primary key`` (SQLite) are handled for you automatically. Same goes for
this tutorial runs PostgreSQL, so the example output is in PostgreSQL quoting of field names -- e.g., using double quotes or single quotes. The
syntax. author of this tutorial runs PostgreSQL, so the example output is in
PostgreSQL syntax.
If you're interested, also run the following commands: If you're interested, also run the following commands: