Files
CMS/src/CMSMicroservice.Infrastructure/Persistence/Migrations/20251225143501_AddAppVersionsTable.cs
T
masoodafar-web 17c2958b9c
Build and Deploy to Production / build-and-deploy (push) Successful in 1m37s
feat(AppVersion): Add version tracking system for frontend cache invalidation
- Add AppVersion entity with CurrentVersion, MinRequiredVersion, RequiresFullCacheClear
- Add GetAppVersion query to check app version and compare with client version
- Add GetAllAppVersions query for admin panel
- Add UpdateAppVersion command to update/create app versions
- Add appversion.proto for gRPC communication
- Add AppVersionService for gRPC endpoints
- Add database migration for AppVersions table
2025-12-25 18:06:12 +03:30

49 lines
2.1 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CMSMicroservice.Infrastructure.Persistence.Migrations
{
/// <inheritdoc />
public partial class AddAppVersionsTable : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "AppVersions",
schema: "CMS",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
AppName = table.Column<string>(type: "nvarchar(max)", nullable: false),
CurrentVersion = table.Column<string>(type: "nvarchar(max)", nullable: false),
MinRequiredVersion = table.Column<string>(type: "nvarchar(max)", nullable: false),
RequiresFullCacheClear = table.Column<bool>(type: "bit", nullable: false),
UpdateMessage = table.Column<string>(type: "nvarchar(max)", nullable: true),
ReleaseNotes = table.Column<string>(type: "nvarchar(max)", nullable: true),
IsActive = table.Column<bool>(type: "bit", nullable: false),
Created = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatedBy = table.Column<string>(type: "nvarchar(max)", nullable: true),
LastModified = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifiedBy = table.Column<string>(type: "nvarchar(max)", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AppVersions", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AppVersions",
schema: "CMS");
}
}
}