diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-11-27 19:28:38 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-11-27 19:28:38 +0000 |
| commit | 1bd85787ecacc587073d64bb7a922e0aad7a604e (patch) | |
| tree | e355b14bfd4b4067e2be1a7f3b19f122d241e909 /docs/tutorial01.txt | |
| parent | 7ff2c879c33b7088d5d458e32cfcc639a1475196 (diff) | |
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
Diffstat (limited to 'docs/tutorial01.txt')
| -rw-r--r-- | docs/tutorial01.txt | 25 |
1 files 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: |
