这是基于vue-vben-admin 模板适用于abp Vnext的前端管理项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

2.2 KiB

LY.MicroService.AuthServer.EntityFrameworkCore

Authentication server database migration module, providing database migration functionality required by the authentication server.

简体中文

Features

  • Integrated OpenIddict authentication framework database migrations
  • Integrated ABP Identity module database migrations
  • Integrated ABP permission management module database migrations
  • Integrated ABP settings management module database migrations
  • Integrated ABP feature management module database migrations
  • Integrated ABP SaaS multi-tenant module database migrations
  • Integrated text templating module database migrations
  • Support for MySQL database

Module Dependencies

[DependsOn(
    typeof(AbpAuthorizationModule),
    typeof(AbpSaasEntityFrameworkCoreModule),
    typeof(AbpOpenIddictEntityFrameworkCoreModule),
    typeof(AbpIdentityEntityFrameworkCoreModule),
    typeof(AbpPermissionManagementEntityFrameworkCoreModule),
    typeof(AbpSettingManagementEntityFrameworkCoreModule),
    typeof(AbpFeatureManagementEntityFrameworkCoreModule),
    typeof(AbpTextTemplatingEntityFrameworkCoreModule),
    typeof(AbpDataDbMigratorModule)
)]
public class YourModule : AbpModule
{
    // other
}

Configuration

{
  "ConnectionStrings": {
    "AuthServerDbMigrator": "your-database-connection-string"
  }
}

Basic Usage

  1. Configure Database Connection String

    • Configure AuthServerDbMigrator connection string in appsettings.json
  2. Add Database Context

    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        context.Services.AddAbpDbContext<AuthServerMigrationsDbContext>();
    
        Configure<AbpDbContextOptions>(options =>
        {
            options.UseMySQL();
        });
    }
    
  3. Execute Database Migration

    • Use EF Core CLI tools to execute migrations
    dotnet ef database update
    

Notes

  • Ensure the database connection string includes the correct permissions to create and modify database tables
  • It's recommended to backup the database before executing migrations
  • Migration scripts will automatically handle dependencies between modules