remove IDeletable fields from Folder and File entities as they are never set and not used
This commit is contained in:
parent
fe97a76d00
commit
54b45943db
|
@ -0,0 +1,35 @@
|
|||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Oqtane.Databases.Interfaces;
|
||||
using Oqtane.Migrations.EntityBuilders;
|
||||
using Oqtane.Repository;
|
||||
|
||||
namespace Oqtane.Migrations.Tenant
|
||||
{
|
||||
[DbContext(typeof(TenantDBContext))]
|
||||
[Migration("Tenant.03.02.02.01")]
|
||||
public class RemoveFolderFileDeletableColumns : MultiDatabaseMigration
|
||||
{
|
||||
public RemoveFolderFileDeletableColumns(IDatabase database) : base(database)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
var folderEntityBuilder = new FolderEntityBuilder(migrationBuilder, ActiveDatabase);
|
||||
folderEntityBuilder.DropColumn("DeletedBy");
|
||||
folderEntityBuilder.DropColumn("DeletedOn");
|
||||
folderEntityBuilder.DropColumn("IsDeleted");
|
||||
|
||||
var fileEntityBuilder = new FileEntityBuilder(migrationBuilder, ActiveDatabase);
|
||||
fileEntityBuilder.DropColumn("DeletedBy");
|
||||
fileEntityBuilder.DropColumn("DeletedOn");
|
||||
fileEntityBuilder.DropColumn("IsDeleted");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
// not implemented
|
||||
}
|
||||
}
|
||||
}
|
|
@ -55,14 +55,6 @@ namespace Oqtane.Models
|
|||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
|
||||
#region IDeletable Properties
|
||||
|
||||
public string DeletedBy { get; set; }
|
||||
public DateTime? DeletedOn { get; set; }
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Object reference to the <see cref="Folder"/> object.
|
||||
/// Use this if you need to determine what <see cref="Site"/> the file belongs to.
|
||||
|
|
|
@ -59,14 +59,6 @@ namespace Oqtane.Models
|
|||
/// </summary>
|
||||
public bool IsSystem { get; set; }
|
||||
|
||||
#region IDeletable Properties
|
||||
|
||||
public string DeletedBy { get; set; }
|
||||
public DateTime? DeletedOn { get; set; }
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// TODO: todoc what would this contain?
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue
Block a user