mirror of
https://github.com/oqtane/oqtane.framework.git
synced 2025-05-18 02:24:22 +00:00

Fixed Version to Tenant.04.00.01.01 and reverted the Program.cs back to the way it was This reverts commit 82fef82c4f29115a3c9f2ffefbae355ce24605e6. [ENHANCE] - Added API to get Count of New Notifications based on IsRead Fixed Typo in Notification Controller [ENHANCE] - Added API to get Notifications by Count and IsRead
36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Oqtane.Databases.Interfaces;
|
|
using Oqtane.Migrations.EntityBuilders;
|
|
using Oqtane.Repository;
|
|
using Oqtane.Shared;
|
|
|
|
namespace Oqtane.Migrations.Tenant
|
|
{
|
|
[DbContext(typeof(TenantDBContext))]
|
|
[Migration("Tenant.04.00.01.01")]
|
|
public class AddNotificationIsRead : MultiDatabaseMigration
|
|
{
|
|
|
|
public AddNotificationIsRead(IDatabase database) : base(database)
|
|
{
|
|
}
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
var notificationEntityBuilder = new NotificationEntityBuilder(migrationBuilder, ActiveDatabase);
|
|
notificationEntityBuilder.AddBooleanColumn("IsRead", false);
|
|
notificationEntityBuilder.UpdateColumn("IsRead", "1", "bool", "");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
var notificationEntityBuilder = new NotificationEntityBuilder(migrationBuilder, ActiveDatabase);
|
|
notificationEntityBuilder.DropColumn("IsPublic");
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|