Error trying to run codidact/core on Fedora 31

I think I am missing something?

Exception thrown: ‘Npgsql.PostgresException’ in Microsoft.EntityFrameworkCore.Relational.dll
fail: Microsoft.EntityFrameworkCore.Database.Command[20102]
Failed executing DbCommand (5ms) [Parameters=[], CommandType=‘Text’, CommandTimeout=‘30’]
CREATE TYPE audit.history_activity_type AS ENUM (‘CREATE’, ‘UPDATE_BEFORE’, ‘UPDATE_AFTER’, ‘DELETE’);
CREATE EXTENSION IF NOT EXISTS adminpack;
Exception thrown: ‘Npgsql.PostgresException’ in Codidact.Core.WebApp.dll
fail: Codidact.Core.WebApp.Startup[0]
Unable to apply database migrations. Check the connection string in your appsettings file.
Loaded ‘/usr/share/dotnet/shared/Microsoft.NETCore.App/3.1.3/System.Diagnostics.StackTrace.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
Loaded ‘/usr/share/dotnet/shared/Microsoft.NETCore.App/3.1.3/System.Reflection.Metadata.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.

Here is how I created the postgresql database

[[email protected] codidact-core]$ systemctl start postgresql
[[email protected] codidact-core]$ systemctl status postgresql
● postgresql.service - PostgreSQL database server
   Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; vendor preset: disabled)
   Active: active (running) since Fri 2020-04-10 16:22:16 MDT; 5s ago
  Process: 13935 ExecStartPre=/usr/libexec/postgresql-check-db-dir postgresql (code=exited, status=0/SUCCESS)
 Main PID: 13941 (postmaster)
    Tasks: 8 (limit: 11817)
   Memory: 22.7M
      CPU: 56ms
   CGroup: /system.slice/postgresql.service
           ├─13941 /usr/bin/postmaster -D /var/lib/pgsql/data
           ├─13949 postgres: logger
           ├─13951 postgres: checkpointer
           ├─13952 postgres: background writer
           ├─13953 postgres: walwriter
           ├─13954 postgres: autovacuum launcher
           ├─13955 postgres: stats collector
           └─13956 postgres: logical replication launcher

Apr 10 16:22:16 ideapadflex-kushal systemd[1]: Starting PostgreSQL database server...
Apr 10 16:22:16 ideapadflex-kushal postmaster[13941]: 2020-04-10 16:22:16.543 MDT [13941] LOG:  listening on IPv6 address "::1", port 5432
Apr 10 16:22:16 ideapadflex-kushal postmaster[13941]: 2020-04-10 16:22:16.543 MDT [13941] LOG:  listening on IPv4 address "127.0.0.1", port 5432
Apr 10 16:22:16 ideapadflex-kushal postmaster[13941]: 2020-04-10 16:22:16.547 MDT [13941] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
Apr 10 16:22:16 ideapadflex-kushal postmaster[13941]: 2020-04-10 16:22:16.550 MDT [13941] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
Apr 10 16:22:16 ideapadflex-kushal postmaster[13941]: 2020-04-10 16:22:16.567 MDT [13941] LOG:  redirecting log output to logging collector process
Apr 10 16:22:16 ideapadflex-kushal postmaster[13941]: 2020-04-10 16:22:16.567 MDT [13941] HINT:  Future log output will appear in directory "log".
Apr 10 16:22:16 ideapadflex-kushal systemd[1]: Started PostgreSQL database server.
[[email protected] codidact-core]$ sudo -iu postgres
[sudo] password for kushal: 
[[email protected] ~]$ createuser codidact
[[email protected] ~]$ createdb --owner codidact codidact
[[email protected] ~]$ logout
1 Like

Can we see your appsettings file? It looks like your connection string is not correct, which is why the migrations are not being applied.

Welcome to our forum!

G’day kus

There’s a table creation script you can find at https://github.com/mcalexster/mcalex_codidact/blob/mcalex/skeleton/Database/Scripts/base/SchemaProposalCurrent_withGenCols.sql. This is the latest db schema as seen at the top of the forum discussion here: Database schema (Round 8) - wip

I think the issue is you need v12 postgre