Martin von Löwis avatar Martin von Löwis committed f45f120 Draft

Record SQL and add migration script for de97e688a806.

Comments (0)

Files changed (2)

+begin;
+alter table codereview_issue add repo_guid varchar(500) default null;
+alter table codereview_patchset drop owner_id;
+alter table codereview_message add in_reply_to_id integer default null references codereview_message;
+alter table codereview_bucket add quoted boolean default false;
+alter table codereview_repository add guid varchar(500) default null;
+commit;
+BEGIN;
+CREATE TABLE "codereview_issue" (
+    "id" serial NOT NULL PRIMARY KEY,
+    "gae_key" varchar(64) UNIQUE,
+    "gae_parent_ctype_id" integer REFERENCES "django_content_type" ("id") DEFERRABLE INITIALLY DEFERRED,
+    "gae_parent_id" integer CHECK ("gae_parent_id" >= 0),
+    "gae_ancestry" varchar(500),
+    "subject" varchar(500) NOT NULL,
+    "description" text,
+    "base" varchar(500),
+    "local_base" boolean,
+    "repo_guid" varchar(500),
+    "owner_id" integer NOT NULL REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED,
+    "created" timestamp with time zone,
+    "modified" timestamp with time zone,
+    "reviewers" text NOT NULL,
+    "cc" text NOT NULL,
+    "closed" boolean,
+    "private" boolean,
+    "n_comments" integer
+)
+;
+CREATE TABLE "codereview_patchset" (
+    "id" serial NOT NULL PRIMARY KEY,
+    "gae_key" varchar(64) UNIQUE,
+    "gae_parent_ctype_id" integer REFERENCES "django_content_type" ("id") DEFERRABLE INITIALLY DEFERRED,
+    "gae_parent_id" integer CHECK ("gae_parent_id" >= 0),
+    "gae_ancestry" varchar(500),
+    "issue_id" integer REFERENCES "codereview_issue" ("id") DEFERRABLE INITIALLY DEFERRED,
+    "message" varchar(500),
+    "data" text,
+    "url" varchar(200),
+    "created" timestamp with time zone,
+    "modified" timestamp with time zone,
+    "n_comments" integer
+)
+;
+CREATE TABLE "codereview_message" (
+    "id" serial NOT NULL PRIMARY KEY,
+    "gae_key" varchar(64) UNIQUE,
+    "gae_parent_ctype_id" integer REFERENCES "django_content_type" ("id") DEFERRABLE INITIALLY DEFERRED,
+    "gae_parent_id" integer CHECK ("gae_parent_id" >= 0),
+    "gae_ancestry" varchar(500),
+    "issue_id" integer REFERENCES "codereview_issue" ("id") DEFERRABLE INITIALLY DEFERRED,
+    "subject" varchar(500),
+    "sender" varchar(75),
+    "recipients" text NOT NULL,
+    "date" timestamp with time zone,
+    "text" text,
+    "draft" boolean,
+    "in_reply_to_id" integer
+)
+;
+ALTER TABLE "codereview_message" ADD CONSTRAINT "in_reply_to_id_refs_id_647ac673" FOREIGN KEY ("in_reply_to_id") REFERENCES "codereview_message" ("id") DEFERRABLE INITIALLY DEFERRED;
+CREATE TABLE "codereview_content" (
+    "id" serial NOT NULL PRIMARY KEY,
+    "gae_key" varchar(64) UNIQUE,
+    "gae_parent_ctype_id" integer REFERENCES "django_content_type" ("id") DEFERRABLE INITIALLY DEFERRED,
+    "gae_parent_id" integer CHECK ("gae_parent_id" >= 0),
+    "gae_ancestry" varchar(500),
+    "text" text,
+    "data" text,
+    "checksum" text,
+    "is_uploaded" boolean,
+    "is_bad" boolean,
+    "file_too_large" boolean
+)
+;
+CREATE TABLE "codereview_patch" (
+    "id" serial NOT NULL PRIMARY KEY,
+    "gae_key" varchar(64) UNIQUE,
+    "gae_parent_ctype_id" integer REFERENCES "django_content_type" ("id") DEFERRABLE INITIALLY DEFERRED,
+    "gae_parent_id" integer CHECK ("gae_parent_id" >= 0),
+    "gae_ancestry" varchar(500),
+    "patchset_id" integer REFERENCES "codereview_patchset" ("id") DEFERRABLE INITIALLY DEFERRED,
+    "filename" varchar(500),
+    "status" varchar(500),
+    "text" text,
+    "content_id" integer REFERENCES "codereview_content" ("id") DEFERRABLE INITIALLY DEFERRED,
+    "patched_content_id" integer REFERENCES "codereview_content" ("id") DEFERRABLE INITIALLY DEFERRED,
+    "is_binary" boolean,
+    "delta" text NOT NULL,
+    "delta_calculated" boolean
+)
+;
+CREATE TABLE "codereview_comment" (
+    "id" serial NOT NULL PRIMARY KEY,
+    "gae_key" varchar(64) UNIQUE,
+    "gae_parent_ctype_id" integer REFERENCES "django_content_type" ("id") DEFERRABLE INITIALLY DEFERRED,
+    "gae_parent_id" integer CHECK ("gae_parent_id" >= 0),
+    "gae_ancestry" varchar(500),
+    "patch_id" integer REFERENCES "codereview_patch" ("id") DEFERRABLE INITIALLY DEFERRED,
+    "message_id" varchar(500),
+    "author_id" integer REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED,
+    "date" timestamp with time zone,
+    "lineno" integer,
+    "text" text,
+    "left" boolean,
+    "draft" boolean
+)
+;
+CREATE TABLE "codereview_bucket" (
+    "id" serial NOT NULL PRIMARY KEY,
+    "gae_key" varchar(64) UNIQUE,
+    "gae_parent_ctype_id" integer REFERENCES "django_content_type" ("id") DEFERRABLE INITIALLY DEFERRED,
+    "gae_parent_id" integer CHECK ("gae_parent_id" >= 0),
+    "gae_ancestry" varchar(500),
+    "text" text,
+    "quoted" boolean
+)
+;
+CREATE TABLE "codereview_repository" (
+    "id" serial NOT NULL PRIMARY KEY,
+    "gae_key" varchar(64) UNIQUE,
+    "gae_parent_ctype_id" integer REFERENCES "django_content_type" ("id") DEFERRABLE INITIALLY DEFERRED,
+    "gae_parent_id" integer CHECK ("gae_parent_id" >= 0),
+    "gae_ancestry" varchar(500),
+    "name" varchar(500) NOT NULL,
+    "url" varchar(200) NOT NULL,
+    "owner_id" integer REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED,
+    "guid" varchar(500)
+)
+;
+CREATE TABLE "codereview_branch" (
+    "id" serial NOT NULL PRIMARY KEY,
+    "gae_key" varchar(64) UNIQUE,
+    "gae_parent_ctype_id" integer REFERENCES "django_content_type" ("id") DEFERRABLE INITIALLY DEFERRED,
+    "gae_parent_id" integer CHECK ("gae_parent_id" >= 0),
+    "gae_ancestry" varchar(500),
+    "repo_id" integer NOT NULL REFERENCES "codereview_repository" ("id") DEFERRABLE INITIALLY DEFERRED,
+    "repo_name" varchar(500),
+    "category" varchar(500) NOT NULL,
+    "name" varchar(500) NOT NULL,
+    "url" varchar(200) NOT NULL,
+    "owner_id" integer REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED
+)
+;
+CREATE TABLE "codereview_account" (
+    "id" serial NOT NULL PRIMARY KEY,
+    "gae_key" varchar(64) UNIQUE,
+    "gae_parent_ctype_id" integer REFERENCES "django_content_type" ("id") DEFERRABLE INITIALLY DEFERRED,
+    "gae_parent_id" integer CHECK ("gae_parent_id" >= 0),
+    "gae_ancestry" varchar(500),
+    "user_id" integer NOT NULL REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED,
+    "email" varchar(75) NOT NULL,
+    "nickname" varchar(500) NOT NULL,
+    "default_context" integer,
+    "default_column_width" integer,
+    "created" timestamp with time zone,
+    "modified" timestamp with time zone,
+    "stars" text NOT NULL,
+    "fresh" boolean,
+    "uploadpy_hint" boolean,
+    "notify_by_email" boolean,
+    "notify_by_chat" boolean,
+    "lower_email" varchar(500),
+    "lower_nickname" varchar(500),
+    "xsrf_secret" text
+)
+;
+COMMIT;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.