feat: added Sdn repo and added some initial tests

This commit is contained in:
Stevan Freeborn
2024-08-21 09:57:24 -05:00
parent 00994cd4d9
commit ecc26d86f6
18 changed files with 474 additions and 373 deletions
@@ -1,107 +1,108 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SanctionsSearch.Worker.Migrations
{
/// <inheritdoc />
public partial class update_models_with_timestamps : Migration
{
/// <inheritdoc />
public partial class update_models_with_timestamps : Migration
protected override void Up(MigrationBuilder migrationBuilder)
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTime>(
name: "CreatedAt",
table: "Sdns",
type: "TEXT",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<DateTime>(
name: "CreatedAt",
table: "Sdns",
type: "TEXT",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<DateTime>(
name: "UpdatedAt",
table: "Sdns",
type: "TEXT",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<DateTime>(
name: "UpdatedAt",
table: "Sdns",
type: "TEXT",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<DateTime>(
name: "CreatedAt",
table: "Comments",
type: "TEXT",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<DateTime>(
name: "CreatedAt",
table: "Comments",
type: "TEXT",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<DateTime>(
name: "UpdatedAt",
table: "Comments",
type: "TEXT",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<DateTime>(
name: "UpdatedAt",
table: "Comments",
type: "TEXT",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<DateTime>(
name: "CreatedAt",
table: "Aliases",
type: "TEXT",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<DateTime>(
name: "CreatedAt",
table: "Aliases",
type: "TEXT",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<DateTime>(
name: "UpdatedAt",
table: "Aliases",
type: "TEXT",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<DateTime>(
name: "UpdatedAt",
table: "Aliases",
type: "TEXT",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<DateTime>(
name: "CreatedAt",
table: "Addresses",
type: "TEXT",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<DateTime>(
name: "CreatedAt",
table: "Addresses",
type: "TEXT",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<DateTime>(
name: "UpdatedAt",
table: "Addresses",
type: "TEXT",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "CreatedAt",
table: "Sdns");
migrationBuilder.DropColumn(
name: "UpdatedAt",
table: "Sdns");
migrationBuilder.DropColumn(
name: "CreatedAt",
table: "Comments");
migrationBuilder.DropColumn(
name: "UpdatedAt",
table: "Comments");
migrationBuilder.DropColumn(
name: "CreatedAt",
table: "Aliases");
migrationBuilder.DropColumn(
name: "UpdatedAt",
table: "Aliases");
migrationBuilder.DropColumn(
name: "CreatedAt",
table: "Addresses");
migrationBuilder.DropColumn(
name: "UpdatedAt",
table: "Addresses");
}
migrationBuilder.AddColumn<DateTime>(
name: "UpdatedAt",
table: "Addresses",
type: "TEXT",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
}
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "CreatedAt",
table: "Sdns");
migrationBuilder.DropColumn(
name: "UpdatedAt",
table: "Sdns");
migrationBuilder.DropColumn(
name: "CreatedAt",
table: "Comments");
migrationBuilder.DropColumn(
name: "UpdatedAt",
table: "Comments");
migrationBuilder.DropColumn(
name: "CreatedAt",
table: "Aliases");
migrationBuilder.DropColumn(
name: "UpdatedAt",
table: "Aliases");
migrationBuilder.DropColumn(
name: "CreatedAt",
table: "Addresses");
migrationBuilder.DropColumn(
name: "UpdatedAt",
table: "Addresses");
}
}
}