Invalid column name 'Description'
See original GitHub issueYour Abp package version: 5.13 Your base framework: .Net Framework or .Net Core: Net core Exception message and stack trace if available.: Invalid column name ‘Description’
Steps needed to reproduce the problem.
- Download a new project from the website
- SPA Angular application
- Include login, register, user, role…
- Open the solution and run the migrator on a fresh database
- Run the host application and before it’s fully started it will throw an exception
I’ve debugged the issue as far as possible, in {companyname}.Authorization.Roles.Role there is a property ‘Description’, which isn’t there in my previous project. By removing this property the error disapears.
[StringLength(MaxDescriptionLength)]
public string Description {get; set;}
The exception is thrown when the following line (in the HostRoleAndUserCreator.cs) is executed by the host application.
var adminRoleForHost = _context.Roles.IgnoreQueryFilters().FirstOrDefault(r => r.TenantId == null && r.Name == StaticRoleNames.Host.Admin);
The weird thing is, the migrator application is also executing this code without any exceptions…
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Hmm okay, then I probably got an older template 😓 but still… In my situation it looks like something is cached between the different solutions, I’m not going to continue with the new template so from my side we can close the issue I guess.
Description field is there almost for 3 years https://github.com/aspnetboilerplate/module-zero-core-template/commit/63f6e3b6147b6df7a08b09a53dad562c57dac17c 😃 . Probably the issue is related to your database. Maybe it was there before you create the template.