Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #933 -- Updated 'django-admin.py sql polls' output in tutorial0…

…1. Thanks, jhernandez

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1465 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1bd85787ecacc587073d64bb7a922e0aad7a604e 1 parent 7ff2c87
@adrianholovaty adrianholovaty authored
Showing with 13 additions and 12 deletions.
  1. +13 −12 docs/tutorial01.txt
View
25 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:
Please sign in to comment.
Something went wrong with that request. Please try again.