Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "niners481"

Hello Sir,

Is it possible to remove "Abp" prefix from the table name? For example: I want my table to be call AuditLogs instead of AbpEditLogs.

I thought this could be accomplish by updating the migration scripts before running "Update-Database" in the Package Manager Console. I did a search and replace all instances of "dbo.AbpEditLogs" to "dbo.EditLogs" on all the scripts.

The "Update-Database" was able to apply all the migration, however it failed when it attempt run the Seed method.

Error message: System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> System.Data.SqlClient.SqlException: Invalid object name 'dbo.AbpEditions'. ... ... at MyTestAbpProject.Migrations.SeedData.DefaultEditionsBuilder.CreateEditions() in C:\MyTestAbpProject\MyTestAbpProject.EntityFramework\Migrations\SeedData\DefaultEditionsBuilder.cs:line 24 at MyTestAbpProject.Migrations.SeedData.DefaultEditionsBuilder.Build() in C:MyTestAbpProject\MyTestAbpProject.EntityFramework\Migrations\SeedData\DefaultEditionsBuilder.cs:line 19 at MyTestAbpProject.Migrations.SeedData.InitialDataBuilder.Build() in C:\MyTestAbpProject\MyTestAbpProject.EntityFramework\Migrations\SeedData\InitialDataBuilder.cs:line 19 at MyTestAbpProject.Migrations.Configuration.Seed(MyTestAbpProjectDbContext context) in C:\MyTestAbpProject\MyTestAbpProject.EntityFramework\Migrations\Configuration.cs:line 16 at System.Data.Entity.Migrations.DbMigrationsConfiguration1.OnSeed(DbContext context) at System.Data.Entity.Migrations.DbMigrator.SeedDatabase() at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.SeedDatabase() at System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable1 pendingMigrations, String targetMigrationId, String lastMigrationId) at ... ...

Looking at DefaultEditionsBuilder.cs line# 24, var defaultEdition = _context.Editions.FirstOrDefault(e => e.Name == EditionManager.DefaultEditionName);

Did find implementation on _context.Editions which eventually lead me to

namespace Abp.Application.Editions { [Table("AbpEditions")] public class Edition : FullAuditedEntity

It appears that the [Table("AbpEditions")] is in your Apb library and I have no way of removing the "Abp" table prefix.

Is there a workaround?

Thanks in advance for your help. -Peter

Showing 1 to 1 of 1 entries