1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 23:31:13 -05:00

add create/update times to penalty identifiers

This commit is contained in:
RaidMax
2022-02-23 09:02:01 -06:00
parent ce27d4fe61
commit 13c09f5184
11 changed files with 5086 additions and 8 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,48 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Data.Migrations.Postgresql
{
public partial class AddAuditFieldsToEFPenaltyIdentifier : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Active",
table: "EFPenaltyIdentifiers");
migrationBuilder.AddColumn<DateTime>(
name: "CreatedDateTime",
table: "EFPenaltyIdentifiers",
type: "timestamp without time zone",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<DateTime>(
name: "UpdatedDateTime",
table: "EFPenaltyIdentifiers",
type: "timestamp without time zone",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "CreatedDateTime",
table: "EFPenaltyIdentifiers");
migrationBuilder.DropColumn(
name: "UpdatedDateTime",
table: "EFPenaltyIdentifiers");
migrationBuilder.AddColumn<bool>(
name: "Active",
table: "EFPenaltyIdentifiers",
type: "boolean",
nullable: false,
defaultValue: false);
}
}
}

View File

@ -1023,8 +1023,8 @@ namespace Data.Migrations.Postgresql
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("PenaltyIdentifierId"));
b.Property<bool>("Active")
.HasColumnType("boolean");
b.Property<DateTime>("CreatedDateTime")
.HasColumnType("timestamp without time zone");
b.Property<int?>("IPv4Address")
.HasColumnType("integer");
@ -1035,6 +1035,9 @@ namespace Data.Migrations.Postgresql
b.Property<int>("PenaltyId")
.HasColumnType("integer");
b.Property<DateTime?>("UpdatedDateTime")
.HasColumnType("timestamp without time zone");
b.HasKey("PenaltyIdentifierId");
b.HasIndex("IPv4Address");