Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BEGIN;
- --
- -- Create model Question
- --
- CREATE TABLE "polls_question" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "question_text" varchar(200) NOT NULL, "pub_date" datetime NOT NULL);
- --
- -- Create model Choice
- --
- 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);
- CREATE INDEX "polls_choice_question_id_c5b4b260" ON "polls_choice" ("question_id");
- COMMIT;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement