Unable to Upgrade Due to Database Permissions

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

1 2 3 4 5 6 7 8 9 10 11 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute Unsuccessful: alter table CONTENT add column DRAFTPAGEID varchar(255) ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute ERROR: must be owner of relation content ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute Unsuccessful: alter table CONTENT add column DRAFTSPACEKEY varchar(255) ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute ERROR: must be owner of relation content ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute Unsuccessful: alter table CONTENT add column DRAFTTYPE varchar(255) ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute ERROR: must be owner of relation content ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute Unsuccessful: alter table CONTENT add column DRAFTPAGEVERSION int4 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute ERROR: must be owner of relation content ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute Unsuccessful: alter table PAGETEMPLATES add column LABELS varchar(255) ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute ERROR: must be owner of relation pagetemplates

Cause

The database was owned by a user that is different from the database user used in Confluence.

Resolution

Ensure that the tables' owner (http://archives.postgresql.org/pgsql-patches/2002-07/msg00198.php) are the same with the database user used by Confluence.

In PostgreSQL, a table's owner can be altered by using the ALTER TABLE query.

The database user is in either <confluence-home>/confluence.cfg.xml or server.xml.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.