For several years we were running our self-hosted Sentry environment on an EC2 host. We’ve been using (hosted) AWS RDS for the Sentry Postgres database.
For neatness, more recently we switched this environment from EC2 to Fargate, while continuing to use the same Postgres database. This mostly works, but we find that we’re unable add new users, so we realized that we must run the Sentry database migrations to migrate from Sentry 9.11 to the latest-and-greatest.
Unfortunately, in Fargate we don’t have the means to ssh to the Sentry software. So instead on a bastion host which can talk to the hosted Postgres, we’re running a docker-compose stack. I’ll try to fill-in the details in the thread below, but the “sentry upgrade” command fails when trying to create a postgres Table which already exists:
FATAL ERROR - The following SQL query failed: CREATE TABLE “sentry_identityprovider” (“id” bigserial NOT NULL PRIMARY KEY, “type” varchar(64) NOT NULL, “instance” varchar(64) NOT NULL)
The error was: ProgrammingError(‘relation “sentry_identityprovider” already exists\n’,)
SQL: CREATE TABLE “sentry_identityprovider” (“id” bigserial NOT NULL PRIMARY KEY, “type” varchar(64) NOT NULL, “instance” varchar(64) NOT NULL)
Error in migration: