Hello viswajwalith,
Could you please share some more steps to reproduce the issue?
Hi Anjali,
We dont have any specific steps to reproduce, but this happening in our hosted environment. After some deployments we observed that delete flag for some records in AbpTextTemplateContents is setting up to 1, so supecting something with migrator. We are sure no user updated this but this is happening automatically. any idea what are the possible scenerios/steps which updateds this flags?
Hi We got the exact issue identified and fixed at our end. This is an issue with ABP logic in updating the email content.
In TemplateContentAppService.cs , as per the existig logic, for every Content update old record are getting deleted and new one is getting created. That is fine. But in case someone clicks on save without changing any content. Old record are getting deleted but new one are not creating because of return statement in case of no content change.
In nut shell in case of no content change we should not dlete the old one as well, So we have moved the delete logic after the retunr statment (in case of no content change)
I am not sure how it was in Latest versions of ABP, make I think this should be handled at framework level only. Let us know in case of any more details needed.
Hello viswajwalith,
Could you please share some more steps to reproduce the issue?
Hi Anjali,
We dont have any specific steps to reproduce, but this happening in our hosted environment. After some deployments we observed that delete flag for some records in AbpTextTemplateContents is setting up to 1, so supecting something with migrator. We are sure no user updated this but this is happening automatically. any idea what are the possible scenerios/steps which updateds this flags?
hi
You can override this service to cache the result.
https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs#L86
Thanks for the input, but I think we had to cache based on user right ???
Hello viswajwalith,
Please do let us know if we can help you with something else?
Can we close this ticket if your query is resolved? Please Confirm.
Thank You, Anjali
For for delay in the response, actually we upgraded directly from 5.1.3 to 7.3.2 and seems working. but not 100% tested. for now you can close the ticket will let you know in case of any queries/concerns.
Actually we followed different approach will let you know in a day or two. Thanks for response.
Hi viswajwalith,
We are checking, will update you asap.
Thanks for the confirmation
Hi Any update on this this by chance?
hi
I think you can only use the
dotnet ef migrations scriptto get the script on each project.The migratory tool just applies the migration and seeds the data.
That's fine, we will generate manually for DB structural changes. but do we have any other way to generate the insert scripts for data seeding from the Migration tool right? Mainly for Permission, Roles and Tenant specific data.
Also sometimes we are getting the Generated SQL file as empty, any idea on that? for the below code
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace XXXX.Migrations
{
    public partial class ImportHistoryLogImportRunHistory : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "CustomField1",
                table: "EmployeeServiceImportRunHistories",
                type: "nvarchar(max)",
                nullable: true);
            migrationBuilder.AddColumn<string>(
                name: "CustomField2",
                table: "EmployeeServiceImportRunHistories",
                type: "nvarchar(max)",
                nullable: true);
            migrationBuilder.AddColumn<string>(
                name: "CustomField3",
                table: "EmployeeServiceImportRunHistories",
                type: "nvarchar(max)",
                nullable: true);
            migrationBuilder.AddColumn<string>(
                name: "CustomField4",
                table: "EmployeeServiceImportRunHistories",
                type: "nvarchar(max)",
                nullable: true);
            migrationBuilder.AddColumn<string>(
                name: "CustomField5",
                table: "EmployeeServiceImportRunHistories",
                type: "nvarchar(max)",
                nullable: true);
            migrationBuilder.AddColumn<string>(
                name: "RowNo",
                table: "EmployeeServiceImportRunHistories",
                type: "nvarchar(max)",
                nullable: true);
            migrationBuilder.AddColumn<string>(
                name: "CustomField1",
                table: "EmployeeServiceImportHistroyLogs",
                type: "nvarchar(max)",
                nullable: true);
            migrationBuilder.AddColumn<string>(
                name: "CustomField2",
                table: "EmployeeServiceImportHistroyLogs",
                type: "nvarchar(max)",
                nullable: true);
            migrationBuilder.AddColumn<string>(
                name: "CustomField3",
                table: "EmployeeServiceImportHistroyLogs",
                type: "nvarchar(max)",
                nullable: true);
            migrationBuilder.AddColumn<string>(
                name: "CustomField4",
                table: "EmployeeServiceImportHistroyLogs",
                type: "nvarchar(max)",
                nullable: true);
            migrationBuilder.AddColumn<string>(
                name: "CustomField5",
                table: "EmployeeServiceImportHistroyLogs",
                type: "nvarchar(max)",
                nullable: true);
            migrationBuilder.AddColumn<string>(
                name: "RowNo",
                table: "EmployeeServiceImportHistroyLogs",
                type: "nvarchar(max)",
                nullable: true);
        }
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "CustomField1",
                table: "EmployeeServiceImportRunHistories");
            migrationBuilder.DropColumn(
                name: "CustomField2",
                table: "EmployeeServiceImportRunHistories");
            migrationBuilder.DropColumn(
                name: "CustomField3",
                table: "EmployeeServiceImportRunHistories");
            migrationBuilder.DropColumn(
                name: "CustomField4",
                table: "EmployeeServiceImportRunHistories");
            migrationBuilder.DropColumn(
                name: "CustomField5",
                table: "EmployeeServiceImportRunHistories");
            migrationBuilder.DropColumn(
                name: "RowNo",
                table: "EmployeeServiceImportRunHistories");
            migrationBuilder.DropColumn(
                name: "CustomField1",
                table: "EmployeeServiceImportHistroyLogs");
            migrationBuilder.DropColumn(
                name: "CustomField2",
                table: "EmployeeServiceImportHistroyLogs");
            migrationBuilder.DropColumn(
                name: "CustomField3",
                table: "EmployeeServiceImportHistroyLogs");
            migrationBuilder.DropColumn(
                name: "CustomField4",
                table: "EmployeeServiceImportHistroyLogs");
            migrationBuilder.DropColumn(
                name: "CustomField5",
                table: "EmployeeServiceImportHistroyLogs");
            migrationBuilder.DropColumn(
                name: "RowNo",
                table: "EmployeeServiceImportHistroyLogs");
        }
    }
}