0
votes

Hi Guys I am trying to apply the deploy command on a database that is hosted on azure. Nevertheless, I got the following error:

sqitch deploy db:pg://cmurcia%40dataplatform:*****@dataplatform.postgres.database.azure.com:5432/dataplatform_metadata_service
Adding registry tables to db:pg://cmurcia%40dataplatform:@dataplatform.postgres.database.azure.com:5432/dataplatform_metadata_service
psql:/usr/share/perl5/App/Sqitch/Engine/pg.sql:4: ERROR:  permission denied for database dataplatform_metadata_service
"/usr/bin/psql" unexpectedly returned exit value 3
I tested with psql and I can both log in and modify tables in the database that is accessed with the mentioned URI (db:pg://cmurcia%40dataplatform:*****@dataplatform.postgres.database.azure.com:5432/dataplatform_metadata_service).

I also tried

sqitch deploy -t postgresql://cmurcia%40dataplatform:Welcome0518%[email protected]:5432/dataplatform_metadata_service
Adding registry tables to db:postgresql://cmurcia%40dataplatform:@dataplatform.postgres.database.azure.com:5432/dataplatform_metadata_service
psql:/usr/share/perl5/App/Sqitch/Engine/pg.sql:4: ERROR:  permission denied for database dataplatform_metadata_service
"/usr/bin/psql" unexpectedly returned exit value 

3

I would like to ask if you have any hints about how to solve this. Thank you!

FYI I am using an ubuntu linux VM hosted on azure to run the command where I installed sqitch, sqitch is working locally.

1

1 Answers

0
votes

The first thing Sqitch does when it connects to a database is create the registry if it does not yet exist. Usually this is a schema named sqtich. Have a look at the Postgres registry script. Be sure you have permission to create the schema. If you don't, have someone else create it and give you the permission to create objects in it as well as your project schema.