Activities of "maliming"

Answer

hi serdar.genc@talentra.net

Can you try use this command?

abp add-module Volo.BasicTheme --with-source-code --add-to-solution-file

i can provide the sample website.

Can you share the URL?

hi

You can manually create the migration according to the help document(src\StructureWeb.EntityFrameworkCore\README.md) of the project, and then execute DbMigrator .

We will fix it. Thank you We have refunded your credit.


How To Add New Migration?

This solution configured so it uses two database schema;

  • Default schema is used to store host & tenant data (when the tenant uses shared database).
  • Tenant schema is used to store only the tenant data (when the tenant uses a dedicated database).

In this way, dedicated tenant databases do not have host-related empty tables.

To make this possible, there are two migrations DbContext in the EntityFrameworkCore project. So, you need to specify the DbContext when you want to add new migration.

When you add/change a multi-tenant entity (that implements IMultiTenant) in your project, you typically need to add two migrations: one for the default DbContext and the other one is for the tenant DbContext. If you are making change for a host-only entity, then you don't need to add-migration for the tenant DbContext (if you add, you will get an empty migration file).

Example: Adding Migration to the Default DbContext

Using Visual Studio Package Manager Console;

Add-Migration Your_Migration_Name -Context StructureWebDbContext

Using EF Core command line tool;

dotnet ef migrations add Your_Migration_Name --context StructureWebDbContext

Example: Adding Migration to the Tenant DbContext

Using Visual Studio Package Manager Console:

Add-Migration Your_Migration_Name -Context StructureWebTenantDbContext -OutputDir TenantMigrations

Using EF Core command line tool:

dotnet ef migrations add Your_Migration_Name --context StructureWebTenantDbContext --output-dir TenantMigrations

Updating the Databases

It is suggested to run the DbMigrator application to update the database after adding a new migration. It is simpler and also automatically handles tenant database upgrades.

hi

What's version of your ABP(cli and suite)?

hi

You can specific the --context parameter.

dotnet ef migrations add Your_Migration_Name --context MyProjectNameDbContext

dotnet ef migrations add Your_Migration_Name --context MyProjectNameTenantDbContext --output-dir TenantMigrations

hi

Can you try to upgrade the CLI to 4.3.3?

https://www.nuget.org/packages/Volo.Abp.Cli/4.3.3

👍

hi

Can you check the ms document?

https://docs.microsoft.com/en-us/aspnet/core/security/docker-https?view=aspnetcore-5.0

Answer

HI abpVAndy

Can you try to remove all exists migrations and re-create?

We will check it.

hi Tony_Albutt

Can you share a minimum project? liming.ma@volosoft.com

Showing 7751 to 7760 of 8747 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09