Skip to content

Updated Version #2126

Apr 10, 2025 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

Here's a solution without suppressing warnings:

  1. Started with setting up proper connection string to my local PostgreSql database in appSettings.Development.json
  2. I've added reference to Microsoft.EntityFrameworkCore.Design within my project
  3. I've needed to make explicit reference to MigrationsAssebly in Program.cs (default is Piranha.Data.EF.PostgreSql) for both PostgreSqlDB and IdentityPostgreSqlDb
options.UseEF<PostgreSqlDb>(db =>
        {
            db.UseNpgsql(connectionString, op =>
            {
                op.MigrationsAssembly(Assembly.GetExecutingAssembly().GetName().Name);
            });
        });
    options.UseIdentityWithSeed<IdentityPostgreSQLDb>(db =>
    {
      …

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@onexkacpermarcisz
Comment options

Comment options

You must be logged in to vote
1 reply
@onexkacpermarcisz
Comment options

Answer selected by onexkacpermarcisz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants