add create/update times to penalty identifiers
This commit is contained in:
parent
a6b56ceded
commit
0d88b6293f
1623
Data/Migrations/MySql/20220223150028_AddAuditFieldsToEFPenaltyIdentifier.Designer.cs
generated
Normal file
1623
Data/Migrations/MySql/20220223150028_AddAuditFieldsToEFPenaltyIdentifier.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Data.Migrations.MySql
|
||||
{
|
||||
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: "datetime(6)",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "UpdatedDateTime",
|
||||
table: "EFPenaltyIdentifiers",
|
||||
type: "datetime(6)",
|
||||
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: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
}
|
||||
}
|
@ -974,8 +974,8 @@ namespace Data.Migrations.MySql
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
b.Property<DateTime>("CreatedDateTime")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int?>("IPv4Address")
|
||||
.HasColumnType("int");
|
||||
@ -986,6 +986,9 @@ namespace Data.Migrations.MySql
|
||||
b.Property<int>("PenaltyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("UpdatedDateTime")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.HasKey("PenaltyIdentifierId");
|
||||
|
||||
b.HasIndex("IPv4Address");
|
||||
|
1680
Data/Migrations/Postgresql/20220223150106_AddAuditFieldsToEFPenaltyIdentifier.Designer.cs
generated
Normal file
1680
Data/Migrations/Postgresql/20220223150106_AddAuditFieldsToEFPenaltyIdentifier.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
@ -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");
|
||||
|
1621
Data/Migrations/Sqlite/20220223144615_AddAuditFieldsToEFPenaltyIdentifier.Designer.cs
generated
Normal file
1621
Data/Migrations/Sqlite/20220223144615_AddAuditFieldsToEFPenaltyIdentifier.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Data.Migrations.Sqlite
|
||||
{
|
||||
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: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: DateTime.UtcNow);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "UpdatedDateTime",
|
||||
table: "EFPenaltyIdentifiers",
|
||||
type: "TEXT",
|
||||
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: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
}
|
||||
}
|
@ -972,8 +972,8 @@ namespace Data.Migrations.Sqlite
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("INTEGER");
|
||||
b.Property<DateTime>("CreatedDateTime")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("IPv4Address")
|
||||
.HasColumnType("INTEGER");
|
||||
@ -984,6 +984,9 @@ namespace Data.Migrations.Sqlite
|
||||
b.Property<int>("PenaltyId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime?>("UpdatedDateTime")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("PenaltyIdentifierId");
|
||||
|
||||
b.HasIndex("IPv4Address");
|
||||
|
@ -10,4 +10,4 @@ namespace Stats.Models
|
||||
public DateTime CreatedDateTime { get; set; } = DateTime.UtcNow;
|
||||
public DateTime? UpdatedDateTime { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,10 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Stats.Models;
|
||||
|
||||
namespace Data.Models;
|
||||
|
||||
public class EFPenaltyIdentifier : SharedEntity
|
||||
public class EFPenaltyIdentifier : AuditFields
|
||||
{
|
||||
[Key]
|
||||
public int PenaltyIdentifierId { get; set; }
|
||||
|
Loading…
Reference in New Issue
Block a user