0
jgray@cpxzgroup.com created
- Am trying to change the data type on column for table that was create using ABP Studio when I try to change the table the old column name keeps coming back in VS code after the code generate and error in the complier. Is there way to purge it so we can add the new data type? Am changing from Date Time to Enum
1 Answer(s)
-
0
When you change a property type (e.g., from DateTime to Enum) in an entity generated by ABP Suite, the old property may persist or reappear after code regeneration if you do not fully remove or update all related code and migration files.
To resolve this and ensure the new data type is applied:
- Delete the old property from the entity in ABP Suite before adding the new enum property.
- Remove any existing migration files related to the entity (in the Migrations folder).
- Clean and rebuild your solution in Visual Studio/VS Code.
- Re-add the property with the new type (enum) in ABP Suite.
- Regenerate the code using ABP Suite.
- Add a new migration and update the database:
dotnet ef migrations add UpdatedProcessStatusType dotnet ef database update
- Ensure that the database schema is updated and the old column type is replaced.
- If you skip removing old migrations or do not clean the solution, the old property/type may persist and cause compiler or runtime errors.
Sources:
- ABP Suite: Generating Entities from an Existing Database Table
- ABP Support: Not able to save changes
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.