Seems after adding a new tenant to use a different connection string from host database, migration must he done. The database migration project does this well, but in visual studio.
In a production server where no visual studio installed how can this be done ?
You can publish the migration application and run in production server.
Hi @liangshiw ,
Is it possible to create an endpoint/ApplicationService that will call the DB migration service?
If yes please let us know.
So that we can just hit the endpoint which will call the DB migration service and DB will be created without running the DB migration project.
this what I tried
using Acme.BookStore.Data;
using Acme.BookStore.DbMigrator;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Services;
namespace Acme.BookStore
{
public class CreateDbAppService : ApplicationService
{
public async Task GetDb()
{
using (var application = AbpApplicationFactory.Create<BookStoreDbMigratorModule>(options =>
{
options.UseAutofac();
}))
{
application.Initialize();
await application
.ServiceProvider
.GetRequiredService<BookStoreDbMigrationService>()
.MigrateAsync();
application.Shutdown();
}
}
}
}
But the issue is I am not able to login using UI.
and when I am trying from swagger using tenant Id login it is giving me success but from the angular its shows invalid.
_Is there anything related to Identity server?_
You can directly inject the BookStoreDbMigrationService service.
You should check BookStore_App client exists.

We're deploying the Host and the DbMigrator for a microservice.
Our docker-compose contains both as services.
I will try this, though it would be good to have this as a standard features for abp
Most helpful comment
We're deploying the
Hostand theDbMigratorfor a microservice.Our docker-compose contains both as services.