MaaS 3.5 - Temporal - relation "schema_version" does not exist

I’m running the latest version of MAAS 3.5, fresh install. Looking at the maas-temporal service, I see these errors:

	/build/temporal-8dYnj9/temporal-1.22.5/src/temporal/fx.go:173:
sql schema version compatibility check failed: unable to read DB schema version keyspace/database: maasdb error: pq: relation "schema_version" does not exist
[Fx] ERROR		Failed to initialize custom logger: could not build arguments for function "go.uber.org/fx".(*module).constructCustomLogger.func2
	/build/temporal-8dYnj9/temporal-1.22.5/src/vendor/go.uber.org/fx/module.go:251:
failed to build fxevent.Logger:
could not build arguments for function "go.temporal.io/server/temporal".glob..func8
	/build/temporal-8dYnj9/temporal-1.22.5/src/temporal/fx.go:1037:
failed to build log.Logger:
received non-nil error from function "go.temporal.io/server/temporal".ServerOptionsProvider
	/build/temporal-8dYnj9/temporal-1.22.5/src/temporal/fx.go:173:
sql schema version compatibility check failed: unable to read DB schema version keyspace/database: maasdb error: pq: relation "schema_version" does not exist

are these errors persistent or did they appear only during the installation? these DB objects should be created by the migrations

Hi @vasartori

I guess the root cause of this issue is the same as here

Did you notice any errors during 3.5 installation?

Can you please check if your database is owned by the correct user and that user has enough permissions?

I ran into the same issue when installing MAAS 3.4 and 3.5 using the maas-ansible-playbook repo.

To fix this I manually had to run the following on the region-controller node:

> sudo maas-region dbupgrade
Operations to perform:
  Apply all migrations: auth, contenttypes, maasserver, metadataserver, piston3, sessions, sites
Running migrations:
  No migrations to apply.
Running Temporal migrations:
  Applied all migrations.

to perform the db migrations needed for the maas-temporal service to run.

There is a pending PR on that repo to fix this exact issue.