mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 18:21:10 +00:00
Adds persistence for plugins and library metadata provider configurations
This commit is contained in:
1 parent
f33817f2d2
commit
f71e72a948
16 files changed
+3381
No files matched your search
+110
@@ -0,0 +1,110 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Lumina.DataAccess.Common.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddsAuditableFieldsToPluginEntities : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "UpdatedOnUtc",
|
||||
table: "Plugins",
|
||||
type: "TEXT",
|
||||
nullable: true,
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "TEXT")
|
||||
.Annotation("Relational:ColumnOrder", 10)
|
||||
.OldAnnotation("Relational:ColumnOrder", 9);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "CreatedBy",
|
||||
table: "Plugins",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"))
|
||||
.Annotation("Relational:ColumnOrder", 9);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "UpdatedBy",
|
||||
table: "Plugins",
|
||||
type: "TEXT",
|
||||
nullable: true)
|
||||
.Annotation("Relational:ColumnOrder", 11);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "CreatedBy",
|
||||
table: "LibraryMetadataProviderConfigurations",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"))
|
||||
.Annotation("Relational:ColumnOrder", 6);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "CreatedOnUtc",
|
||||
table: "LibraryMetadataProviderConfigurations",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified))
|
||||
.Annotation("Relational:ColumnOrder", 5);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "UpdatedBy",
|
||||
table: "LibraryMetadataProviderConfigurations",
|
||||
type: "TEXT",
|
||||
nullable: true)
|
||||
.Annotation("Relational:ColumnOrder", 8);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "UpdatedOnUtc",
|
||||
table: "LibraryMetadataProviderConfigurations",
|
||||
type: "TEXT",
|
||||
nullable: true)
|
||||
.Annotation("Relational:ColumnOrder", 7);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CreatedBy",
|
||||
table: "Plugins");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UpdatedBy",
|
||||
table: "Plugins");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CreatedBy",
|
||||
table: "LibraryMetadataProviderConfigurations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CreatedOnUtc",
|
||||
table: "LibraryMetadataProviderConfigurations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UpdatedBy",
|
||||
table: "LibraryMetadataProviderConfigurations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UpdatedOnUtc",
|
||||
table: "LibraryMetadataProviderConfigurations");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "UpdatedOnUtc",
|
||||
table: "Plugins",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "TEXT",
|
||||
oldNullable: true)
|
||||
.Annotation("Relational:ColumnOrder", 9)
|
||||
.OldAnnotation("Relational:ColumnOrder", 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user