dcramer/sentry — Issue #337: Migrations fail on PostgreSQL
Author: jpvanhal
Created: 2012-02-04 19:38:58+00:00
State: open

Database migrations fail on a fresh PostgreSQL database.

The problem seems to be that Raven tries to log messages to the database before necessary tables have been created. If I add 'south' to `exclude` parameter in `raven.conf:setup_logging`, the migrations run fine.

```
$ sentry upgrade --config=sentry.conf.py
Syncing...

SELECT c.relname
FROM pg_catalog.pg_class c
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE c.relkind IN ('r', 'v', '')
AND n.nspname NOT IN ('pg_catalog', 'pg_toast')
AND pg_catalog.pg_table_is_visible(c.oid)
Creating tables ...
Creating table auth_permission
CREATE TABLE "auth_permission" (
"id" serial NOT NULL PRIMARY KEY,
"name" varchar(50) NOT NULL,
"content_type_id" integer NOT NULL,
"codename" varchar(100) NOT NULL,
UNIQUE ("content_type_id", "codename")
)
;
Creating table auth_group_permissions
CREATE TABLE "auth_group_permissions" (
"id" serial NOT NULL PRIMARY KEY,
"group_id" integer NOT NULL,
"permission_id" integer NOT NULL REFERENCES "auth_permission" ("id") DEFERRABLE INITIALLY DEFERRED,
UNIQUE ("group_id", "permission_id")
)
;
Creating table auth_group
CREATE TABLE "auth_group" (
"id" serial NOT NULL PRIMARY KEY,
"name" varchar(80) NOT NULL UNIQUE
)
;
ALTER TABLE "auth_group_permissions" ADD CONSTRAINT "group_id_refs_id_3cea63fe" FOREIGN KEY ("group_id") REFERENCES "auth_group" ("id") DEFERRABLE INITIALLY DEFERRED;
Creating table auth_user_user_permissions
CREATE TABLE "auth_user_user_permissions" (
"id" serial NOT NULL PRIMARY KEY,
"user_id" integer NOT NULL,
"permission_id" integer NOT NULL REFERENCES "auth_permission" ("id") DEFERRABLE INITIALLY DEFERRED,
UNIQUE ("user_id", "permission_id")
)
;
Creating table auth_user_groups
CREATE TABLE "auth_user_groups" (
"id" serial NOT NULL PRIMARY KEY,
"user_id" integer NOT NULL,
"group_id" integer NOT NULL REFERENCES "auth_group" ("id") DEFERRABLE INITIALLY DEFERRED,
UNIQUE ("user_id", "group_id")
)
;
Creating table auth_user
CREATE TABLE "auth_user" (
"id" serial NOT NULL PRIMARY KEY,
"username" varchar(30) NOT NULL UNIQUE,
"first_name" varchar(30) NOT NULL,
"last_name" varchar(30) NOT NULL,
"email" varchar(75) NOT NULL,
"password" varchar(128) NOT NULL,
"is_staff" boolean NOT NULL,
"is_active" boolean NOT NULL,
"is_superuser" boolean NOT NULL,
"last_login" timestamp with time zone NOT NULL,
"date_joined" timestamp with time zone NOT NULL
)
;
ALTER TABLE "auth_user_user_permissions" ADD CONSTRAINT "user_id_refs_id_f2045483" FOREIGN KEY ("user_id") REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE "auth_user_groups" ADD CONSTRAINT "user_id_refs_id_831107f1" FOREIGN KEY ("user_id") REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED;
Creating table auth_message
CREATE TABLE "auth_message" (
"id" serial NOT NULL PRIMARY KEY,
"user_id" integer NOT NULL REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED,
"message" text NOT NULL
)
;
Creating table django_admin_log
CREATE TABLE "django_admin_log" (
"id" serial NOT NULL PRIMARY KEY,
"action_time" timestamp with time zone NOT NULL,
"user_id" integer NOT NULL REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED,
"content_type_id" integer,
"object_id" text,
"object_repr" varchar(200) NOT NULL,
"action_flag" smallint CHECK ("action_flag" >= 0) NOT NULL,
"change_message" text NOT NULL
)
;
Creating table django_content_type
CREATE TABLE "django_content_type" (
"id" serial NOT NULL PRIMARY KEY,
"name" varchar(100) NOT NULL,
"app_label" varchar(100) NOT NULL,
"model" varchar(100) NOT NULL,
UNIQUE ("app_label", "model")
)
;
ALTER TABLE "auth_permission" ADD CONSTRAINT "content_type_id_refs_id_728de91f" FOREIGN KEY ("content_type_id") REFERENCES "django_content_type" ("id") DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE "django_admin_log" ADD CONSTRAINT "content_type_id_refs_id_288599e6" FOREIGN KEY ("content_type_id") REFERENCES "django_content_type" ("id") DEFERRABLE INITIALLY DEFERRED;
Creating table django_session
CREATE TABLE "django_session" (
"session_key" varchar(40) NOT NULL PRIMARY KEY,
"session_data" text NOT NULL,
"expire_date" timestamp with time zone NOT NULL
)
;
Creating table django_site
CREATE TABLE "django_site" (
"id" serial NOT NULL PRIMARY KEY,
"domain" varchar(100) NOT NULL,
"name" varchar(50) NOT NULL
)
;
Creating table djkombu_queue
CREATE TABLE "djkombu_queue" (
"id" serial NOT NULL PRIMARY KEY,
"name" varchar(200) NOT NULL UNIQUE
)
;
Creating table djkombu_message
CREATE TABLE "djkombu_message" (
"id" serial NOT NULL PRIMARY KEY,
"visible" boolean NOT NULL,
"sent_at" timestamp with time zone,
"payload" text NOT NULL,
"queue_id" integer NOT NULL REFERENCES "djkombu_queue" ("id") DEFERRABLE INITIALLY DEFERRED
)
;
Creating table south_migrationhistory
CREATE TABLE "south_migrationhistory" (
"id" serial NOT NULL PRIMARY KEY,
"app_name" varchar(255) NOT NULL,
"migration" varchar(255) NOT NULL,
"applied" timestamp with time zone NOT NULL
)
;
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
SAVEPOINT s139807747434272_x1
INSERT INTO "django_content_type" ("name", "app_label", "model") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"django_content_type"','id'))
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
SAVEPOINT s139807747434272_x1
INSERT INTO "django_content_type" ("name", "app_label", "model") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"django_content_type"','id'))
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
SAVEPOINT s139807747434272_x1
INSERT INTO "django_content_type" ("name", "app_label", "model") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"django_content_type"','id'))
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
SAVEPOINT s139807747434272_x1
INSERT INTO "django_content_type" ("name", "app_label", "model") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"django_content_type"','id'))
SELECT "auth_permission"."content_type_id", "auth_permission"."codename" FROM "auth_permission" INNER JOIN "django_content_type" ON ("auth_permission"."content_type_id" = "django_content_type"."id") WHERE "auth_permission"."content_type_id" IN (%s, %s, %s, %s) ORDER BY "django_content_type"."app_label" ASC, "django_content_type"."model" ASC, "auth_permission"."codename" ASC
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE "django_content_type"."app_label" = %s ORDER BY "django_content_type"."name" ASC
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
SAVEPOINT s139807747434272_x1
INSERT INTO "django_content_type" ("name", "app_label", "model") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"django_content_type"','id'))
SELECT "auth_permission"."content_type_id", "auth_permission"."codename" FROM "auth_permission" INNER JOIN "django_content_type" ON ("auth_permission"."content_type_id" = "django_content_type"."id") WHERE "auth_permission"."content_type_id" IN (%s) ORDER BY "django_content_type"."app_label" ASC, "django_content_type"."model" ASC, "auth_permission"."codename" ASC
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE "django_content_type"."app_label" = %s ORDER BY "django_content_type"."name" ASC
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
SAVEPOINT s139807747434272_x1
INSERT INTO "django_content_type" ("name", "app_label", "model") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"django_content_type"','id'))
SELECT "auth_permission"."content_type_id", "auth_permission"."codename" FROM "auth_permission" INNER JOIN "django_content_type" ON ("auth_permission"."content_type_id" = "django_content_type"."id") WHERE "auth_permission"."content_type_id" IN (%s) ORDER BY "django_content_type"."app_label" ASC, "django_content_type"."model" ASC, "auth_permission"."codename" ASC
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE "django_content_type"."app_label" = %s ORDER BY "django_content_type"."name" ASC
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
SAVEPOINT s139807747434272_x1
INSERT INTO "django_content_type" ("name", "app_label", "model") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"django_content_type"','id'))
SELECT "auth_permission"."content_type_id", "auth_permission"."codename" FROM "auth_permission" INNER JOIN "django_content_type" ON ("auth_permission"."content_type_id" = "django_content_type"."id") WHERE "auth_permission"."content_type_id" IN (%s) ORDER BY "django_content_type"."app_label" ASC, "django_content_type"."model" ASC, "auth_permission"."codename" ASC
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE "django_content_type"."app_label" = %s ORDER BY "django_content_type"."name" ASC
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
SAVEPOINT s139807747434272_x1
INSERT INTO "django_content_type" ("name", "app_label", "model") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"django_content_type"','id'))
SELECT "auth_permission"."content_type_id", "auth_permission"."codename" FROM "auth_permission" INNER JOIN "django_content_type" ON ("auth_permission"."content_type_id" = "django_content_type"."id") WHERE "auth_permission"."content_type_id" IN (%s) ORDER BY "django_content_type"."app_label" ASC, "django_content_type"."model" ASC, "auth_permission"."codename" ASC
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE "django_content_type"."app_label" = %s ORDER BY "django_content_type"."name" ASC
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
INSERT INTO "django_site" ("domain", "name") VALUES (%s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"django_site"','id'))
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
SAVEPOINT s139807747434272_x1
INSERT INTO "django_content_type" ("name", "app_label", "model") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"django_content_type"','id'))
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
SAVEPOINT s139807747434272_x1
INSERT INTO "django_content_type" ("name", "app_label", "model") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"django_content_type"','id'))
SELECT "auth_permission"."content_type_id", "auth_permission"."codename" FROM "auth_permission" INNER JOIN "django_content_type" ON ("auth_permission"."content_type_id" = "django_content_type"."id") WHERE "auth_permission"."content_type_id" IN (%s, %s) ORDER BY "django_content_type"."app_label" ASC, "django_content_type"."model" ASC, "auth_permission"."codename" ASC
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE "django_content_type"."app_label" = %s ORDER BY "django_content_type"."name" ASC
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE "django_content_type"."app_label" = %s ORDER BY "django_content_type"."name" ASC
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
SAVEPOINT s139807747434272_x1
INSERT INTO "django_content_type" ("name", "app_label", "model") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"django_content_type"','id'))
SELECT "auth_permission"."content_type_id", "auth_permission"."codename" FROM "auth_permission" INNER JOIN "django_content_type" ON ("auth_permission"."content_type_id" = "django_content_type"."id") WHERE "auth_permission"."content_type_id" IN (%s) ORDER BY "django_content_type"."app_label" ASC, "django_content_type"."model" ASC, "auth_permission"."codename" ASC
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
INSERT INTO "auth_permission" ("name", "content_type_id", "codename") VALUES (%s, %s, %s)
SELECT CURRVAL(pg_get_serial_sequence('"auth_permission"','id'))
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE "django_content_type"."app_label" = %s ORDER BY "django_content_type"."name" ASC
SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )
Installing custom SQL ...
Installing indexes ...
CREATE INDEX "auth_permission_content_type_id" ON "auth_permission" ("content_type_id");
CREATE INDEX "auth_group_permissions_group_id" ON "auth_group_permissions" ("group_id");
CREATE INDEX "auth_group_permissions_permission_id" ON "auth_group_permissions" ("permission_id");
CREATE INDEX "auth_user_user_permissions_user_id" ON "auth_user_user_permissions" ("user_id");
CREATE INDEX "auth_user_user_permissions_permission_id" ON "auth_user_user_permissions" ("permission_id");
CREATE INDEX "auth_user_groups_user_id" ON "auth_user_groups" ("user_id");
CREATE INDEX "auth_user_groups_group_id" ON "auth_user_groups" ("group_id");
CREATE INDEX "auth_message_user_id" ON "auth_message" ("user_id");
CREATE INDEX "django_admin_log_user_id" ON "django_admin_log" ("user_id");
CREATE INDEX "django_admin_log_content_type_id" ON "django_admin_log" ("content_type_id");
CREATE INDEX "django_session_expire_date" ON "django_session" ("expire_date");
CREATE INDEX "djkombu_message_visible" ON "djkombu_message" ("visible");
CREATE INDEX "djkombu_message_sent_at" ON "djkombu_message" ("sent_at");
CREATE INDEX "djkombu_message_queue_id" ON "djkombu_message" ("queue_id");
No fixtures found.

Synced:
> django.contrib.auth
> django.contrib.admin
> django.contrib.contenttypes
> django.contrib.sessions
> django.contrib.sites
> djkombu
> raven.contrib.django
> south

Not synced (use migrations):
- sentry
(use ./manage.py migrate to migrate these)
SELECT "south_migrationhistory"."id", "south_migrationhistory"."app_name", "south_migrationhistory"."migration", "south_migrationhistory"."applied" FROM "south_migrationhistory" WHERE "south_migrationhistory"."applied" IS NOT NULL
Running migrations for sentry:
- Migrating forwards to 0040_auto__del_unique_event_event_id__add_unique_event_project_event_id.
> sentry:0001_initial
SELECT "sentry_project"."id", "sentry_project"."name", "sentry_project"."owner_id", "sentry_project"."public", "sentry_project"."date_added", "sentry_project"."status" FROM "sentry_project" WHERE "sentry_project"."id" = %s
Unable to record event: relation "sentry_project" does not exist
LINE 1: ...ect"."date_added", "sentry_project"."status" FROM "sentry_pr...
^

CREATE TABLE "sentry_groupedmessage" ("id" serial NOT NULL PRIMARY KEY, "logger" varchar(64) NOT NULL DEFAULT 'root', "class_name" varchar(128) NULL, "level" integer CHECK ("level" >= 0) NOT NULL DEFAULT 40, "message" text NOT NULL, "traceback" text NULL, "view" varchar(200) NOT NULL, "url" varchar(200) NULL, "server_name" varchar(128) NOT NULL, "checksum" varchar(32) NOT NULL, "status" integer CHECK ("status" >= 0) NOT NULL DEFAULT 0, "times_seen" integer CHECK ("times_seen" >= 0) NOT NULL DEFAULT 1, "last_seen" timestamp with time zone NOT NULL DEFAULT '2012-02-04 21:29:19.912776', "first_seen" timestamp with time zone NOT NULL DEFAULT '2012-02-04 21:29:19.912914');
SELECT "sentry_project"."id", "sentry_project"."name", "sentry_project"."owner_id", "sentry_project"."public", "sentry_project"."date_added", "sentry_project"."status" FROM "sentry_project" WHERE "sentry_project"."id" = %s
Unable to record event: relation "sentry_project" does not exist
LINE 1: ...ect"."date_added", "sentry_project"."status" FROM "sentry_pr...
^

ALTER TABLE "sentry_groupedmessage" ADD CONSTRAINT "sentry_groupedmessage_logger_6620e83ff8553a25_uniq" UNIQUE ("logger", "view", "checksum")
Traceback (most recent call last):
File "/home/janne/Documents/Development/sentry/bin/sentry", line 8, in
load_entry_point('sentry==2.6.2', 'console_scripts', 'sentry')()
File "/home/janne/Documents/Development/sentry/local/lib/python2.7/site-packages/sentry/scripts/runner.py", line 179, in main
command(**kwargs)
File "/home/janne/Documents/Development/sentry/local/lib/python2.7/site-packages/sentry/commands/upgrade.py", line 21, in upgrade
call_command('migrate', database='default', interactive=interactive, delete_ghosts=delete_ghosts)
File "/home/janne/Documents/Development/sentry/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 166, in call_command
return klass.execute(*args, **defaults)
File "/home/janne/Documents/Development/sentry/local/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute
output = self.handle(*args, **options)
File "/home/janne/Documents/Development/sentry/local/lib/python2.7/site-packages/south/management/commands/migrate.py", line 105, in handle
ignore_ghosts = ignore_ghosts,
File "/home/janne/Documents/Development/sentry/local/lib/python2.7/site-packages/south/migration/__init__.py", line 191, in migrate_app
success = migrator.migrate_many(target, workplan, database)
File "/home/janne/Documents/Development/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 221, in migrate_many
result = migrator.__class__.migrate_many(migrator, target, migrations, database)
File "/home/janne/Documents/Development/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 292, in migrate_many
result = self.migrate(migration, database)
File "/home/janne/Documents/Development/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 125, in migrate
result = self.run(migration)
File "/home/janne/Documents/Development/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 99, in run
return self.run_migration(migration)
File "/home/janne/Documents/Development/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 81, in run_migration
migration_function()
File "/home/janne/Documents/Development/sentry/local/lib/python2.7/site-packages/south/migration/migrators.py", line 57, in
return (lambda: direction(orm))
File "/home/janne/Documents/Development/sentry/local/lib/python2.7/site-packages/sentry/migrations/0001_initial.py", line 31, in forwards
db.create_unique('sentry_groupedmessage', ['logger', 'view', 'checksum'])
File "/home/janne/Documents/Development/sentry/local/lib/python2.7/site-packages/south/db/generic.py", line 461, in create_unique
cols,
File "/home/janne/Documents/Development/sentry/local/lib/python2.7/site-packages/south/db/generic.py", line 150, in execute
cursor.execute(sql, params)
File "/home/janne/Documents/Development/sentry/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 45, in execute
return self.cursor.execute(query, args)
django.db.utils.DatabaseError: relation "sentry_groupedmessage" does not exist
```