With PostgreSQL configured as the primary data layer, deploying the demo model into a fresh empty database always fails with role "origam" does not exist
Environment
- ORIGAM Architect (WinForms),
master
- PostgreSQL 16, local instance, stock cluster (only the
postgres role exists)
- Model:
model-tests/model
- Fresh, empty
origam-demo database
OrigamSettings.config:
<DataConnectionString>sslmode=disable;Application Name=Origam;Host=localhost;Port=5432;Username=postgres;Password=***;Database=origam-demo;Pooling=True;Search Path=origam-demo,public</DataConnectionString>
<SchemaDataService>Origam.DA.Service.PgSqlDataService, Origam.DA.Service</SchemaDataService>
<DataDataService>Origam.DA.Service.PgSqlDataService, Origam.DA.Service</DataDataService>
Steps to reproduce
- Create an empty PostgreSQL database
- Point
OrigamSettings.config at it using PgSqlDataService as shown above.
- Start Architect and double-click the AutomaticTests package.
- Confirm the Deployment Scripts Pending dialog.
Expected
The deployment scripts create the base schema and seed data, and the application can start.
Actual
Deployment aborts with 42704: role "origam" does not exist. The transaction is rolled back and the database still contains zero tables.
Exception
========================================
Error while loading package 'AutomaticTests'
Update failed.
========================================
Update failed.
------------------------------------------
42704: role "origam" does not exist
------------------------------------------
========================================
Stack trace
========================================
at Npgsql.Internal.NpgsqlConnector.<<ReadMessage>g__ReadMessageLong|232_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Npgsql.NpgsqlDataReader.<<ReadMessage>g__ReadMessageSequential|44_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Npgsql.NpgsqlDataReader.<NextResult>d__47.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Npgsql.NpgsqlDataReader.<NextResult>d__47.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Npgsql.NpgsqlDataReader.NextResult()
at Npgsql.NpgsqlCommand.<ExecuteReader>d__124.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Npgsql.NpgsqlCommand.<ExecuteReader>d__124.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at Origam.DA.Service.AbstractSqlDataService.ExecuteUpdate(String command, String transactionId) in C:\Users\Danil\source\repos\origam\backend\Origam.DA.Service\AbstractSqlDataService.cs:line 1518
at Origam.Workflow.DataServiceAgent.ExecuteUpdate(String command, String transactionId) in C:\Users\Danil\source\repos\origam\backend\Origam.Workflow\Service Agents\DataServiceAgent.cs:line 641
at Origam.Workbench.Services.DeploymentService.ExecuteActivity(ServiceCommandUpdateScriptActivity activity) in C:\Users\Danil\source\repos\origam\backend\Origam.Workbench.Services\DeploymentService.cs:line 259
at Origam.Workbench.Services.DeploymentService.ExecuteActivity(AbstractUpdateScriptActivity activity) in C:\Users\Danil\source\repos\origam\backend\Origam.Workbench.Services\DeploymentService.cs:line 229
at Origam.Workbench.Services.DeploymentService.<Update>b__25_1(DeploymentVersion deplVersion) in C:\Users\Danil\source\repos\origam\backend\Origam.Workbench.Services\DeploymentService.cs:line 356
at MoreLinq.MoreEnumerable.ForEach[T](IEnumerable`1 source, Action`1 action) in /_/MoreLinq/ForEach.cs:line 37
at Origam.Workbench.Services.DeploymentService.Update() in C:\Users\Danil\source\repos\origam\backend\Origam.Workbench.Services\DeploymentService.cs:line 347
at Origam.Workbench.Services.DeploymentService.RunWithErrorHandling(Action action) in C:\Users\Danil\source\repos\origam\backend\Origam.Workbench.Services\DeploymentService.cs:line 102 at Origam.Workbench.Services.DeploymentService.RunWithErrorHandling(Action action) in C:\Users\Danil\source\repos\origam\backend\Origam.Workbench.Services\DeploymentService.cs:line 108
at Origam.Workbench.Services.DeploymentService.Deploy() in C:\Users\Danil\source\repos\origam\backend\Origam.Workbench.Services\DeploymentService.cs:line 86
at OrigamArchitect.frmMain._schema_SchemaLoaded(Object sender, Boolean isInteractive) in C:\Users\Danil\source\repos\origam\backend\OrigamArchitect\ArchitectWorkbench.cs:line 2553
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at Origam.Workbench.Services.SchemaService.OnSchemaLoaded(Boolean isInteractive) in C:\Users\Danil\source\repos\origam\backend\Origam.Workbench.Services\SchemaService.cs:line 378
at Origam.Workbench.Services.SchemaService.LoadSchema(Guid schemaExtensionId, Boolean isInteractive) in C:\Users\Danil\source\repos\origam\backend\Origam.Workbench.Services\SchemaService.cs:line 222
at Origam.Workbench.Commands.LoadSelectedPackage.Run() in C:\Users\Danil\source\repos\origam\backend\Origam.Workbench\Commands\PackageCommands.cs:line 54
at Origam.Workbench.Pads.ExtensionPad.OpenSelectedPackage() in C:\Users\Danil\source\repos\origam\backend\Origam.Workbench\Pads\ExtensionPad.cs:line 358
It might also be worth adjusting the documentation at
origam/HOWTOSTART.md at master · origam/origam · GitHub to explain how to set up
a PostgreSQL db layer, now it contains only documenation about MsSQL