Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/Daml on Postgres specific Flyway DB user and App Datasource userForum ↗

Daml on Postgres specific Flyway DB user and App Datasource user

App Development3 posts250 views1 likesLast activity Oct 2021
AL
Alex_Martinez_VilaOP
Oct 2021

Hi,

I’m trying to find some documentation about a way to have 2 different users on Daml on postgres.

Basically we would like to have 1 user for Flyway that will be granted to execute schema operations like Create, Delete tables, and another one for the application, that will be able to do data operations like insert, update, etc… but not been able to create and delete tables.

GA
Gary_Verhaegen
Oct 2021

Hi @Alex_Martinez_Vila,

If I understand your request correctly, this is already supported by the PostgreSQL driver. As described in this document, you can run the JAR file with --sql-start-mode migrate-only & your first, highly-permissioned user to just do the table creation/update operations, and then run again with --sql-start-mode migrate-and-start (or not passing the option at all, as that is the default behaviour) with your more restricted user, and, provided the schema is already created, this will not make any table operations.

AL
Alex_Martinez_Vila
Oct 2021

Thank you very much , I think it’s what I was looking for as long as migrate-and-start is not failing on checking data in flyway tables.

← Back to Discussions