Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. BEGIN;
  2. --
  3. -- Create model Question
  4. --
  5. CREATE TABLE "polls_question" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "question_text" varchar(200) NOT NULL, "pub_date" datetime NOT NULL);
  6. --
  7. -- Create model Choice
  8. --
  9. CREATE TABLE "polls_choice" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "choice_text" varchar(200) NOT NULL, "votes" integer NOT NULL, "question_id" integer NOT NULL REFERENCES "polls_question" ("id") DEFERRABLE INITIALLY DEFERRED);
  10. CREATE INDEX "polls_choice_question_id_c5b4b260" ON "polls_choice" ("question_id");
  11. COMMIT;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement