Skip to content

Instantly share code, notes, and snippets.

@relrod
Created December 28, 2009 21:29
Show Gist options
  • Save relrod/264955 to your computer and use it in GitHub Desktop.
Save relrod/264955 to your computer and use it in GitHub Desktop.
[/home/ricky/dev/eighthbit] -> ./manage.py sqlall wiki
BEGIN;
CREATE TABLE "wiki_page" (
"id" integer NOT NULL PRIMARY KEY,
"title" varchar(200) NOT NULL,
"revision_id" integer NOT NULL
)
;
CREATE TABLE "wiki_revision" (
"id" integer NOT NULL PRIMARY KEY,
"contents" text NOT NULL,
"username_id" integer NOT NULL REFERENCES "auth_user" ("id"),
"page_id" integer NOT NULL UNIQUE REFERENCES "wiki_page" ("id")
)
;
CREATE INDEX "wiki_page_revision_id" ON "wiki_page" ("revision_id");
CREATE INDEX "wiki_revision_username_id" ON "wiki_revision" ("username_id");
COMMIT;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment