49 lines
2.5 KiB
C#
49 lines
2.5 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using NodaTime;
|
|
|
|
#nullable disable
|
|
|
|
namespace DysonNetwork.Sphere.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddActivityPubDelivery : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "activity_pub_deliveries",
|
|
columns: table => new
|
|
{
|
|
id = table.Column<Guid>(type: "uuid", nullable: false),
|
|
activity_id = table.Column<string>(type: "character varying(2048)", maxLength: 2048, nullable: false),
|
|
activity_type = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
|
|
inbox_uri = table.Column<string>(type: "character varying(2048)", maxLength: 2048, nullable: false),
|
|
actor_uri = table.Column<string>(type: "character varying(2048)", maxLength: 2048, nullable: false),
|
|
status = table.Column<int>(type: "integer", nullable: false),
|
|
retry_count = table.Column<int>(type: "integer", nullable: false),
|
|
error_message = table.Column<string>(type: "character varying(4096)", maxLength: 4096, nullable: true),
|
|
last_attempt_at = table.Column<Instant>(type: "timestamp with time zone", nullable: true),
|
|
next_retry_at = table.Column<Instant>(type: "timestamp with time zone", nullable: true),
|
|
sent_at = table.Column<Instant>(type: "timestamp with time zone", nullable: true),
|
|
response_status_code = table.Column<string>(type: "character varying(2048)", maxLength: 2048, nullable: true),
|
|
created_at = table.Column<Instant>(type: "timestamp with time zone", nullable: false),
|
|
updated_at = table.Column<Instant>(type: "timestamp with time zone", nullable: false),
|
|
deleted_at = table.Column<Instant>(type: "timestamp with time zone", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("pk_activity_pub_deliveries", x => x.id);
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "activity_pub_deliveries");
|
|
}
|
|
}
|
|
}
|