Django

Code

Changeset 1465

Show
Ignore:
Timestamp:
11/27/05 13:28:38 (3 years ago)
Author:
adrian
Message:

Fixed #933 -- Updated 'django-admin.py sql polls' output in tutorial01. Thanks, jhernandez

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/tutorial01.txt

    r1285 r1465  
    228228 
    229229    BEGIN; 
    230     CREATE TABLE polls_polls
    231         id serial NOT NULL PRIMARY KEY, 
    232         question varchar(200) NOT NULL, 
    233         pub_date timestamp with time zone NOT NULL 
     230    CREATE TABLE "polls_polls"
     231        "id" serial NOT NULL PRIMARY KEY, 
     232        "question" varchar(200) NOT NULL, 
     233        "pub_date" timestamp with time zone NOT NULL 
    234234    ); 
    235     CREATE TABLE polls_choices
    236         id serial NOT NULL PRIMARY KEY, 
    237         poll_id integer NOT NULL REFERENCES polls_polls (id), 
    238         choice varchar(200) NOT NULL, 
    239         votes integer NOT NULL 
     235    CREATE TABLE "polls_choices"
     236        "id" serial NOT NULL PRIMARY KEY, 
     237        "poll_id" integer NOT NULL REFERENCES "polls_polls" ("id"), 
     238        "choice" varchar(200) NOT NULL, 
     239        "votes" integer NOT NULL 
    240240    ); 
    241241    COMMIT; 
     
    256256    * It's tailored to the database you're using, so database-specific field types 
    257257      such as ``auto_increment`` (MySQL), ``serial`` (PostgreSQL), or ``integer 
    258       primary key`` (SQLite) are handled for you automatically. The author of 
    259       this tutorial runs PostgreSQL, so the example output is in PostgreSQL 
    260       syntax. 
     258      primary key`` (SQLite) are handled for you automatically. Same goes for 
     259      quoting of field names -- e.g., using double quotes or single quotes. The 
     260      author of this tutorial runs PostgreSQL, so the example output is in 
     261      PostgreSQL syntax. 
    261262 
    262263If you're interested, also run the following commands: