bf32a7def2
CI - Build & Test / Backend (.NET) (push) Successful in 50s
CI - Build & Test / Backend integration (PostgreSQL/Toxiproxy) (push) Failing after 58s
CI - Build & Test / Frontend (Vue/TS) (push) Has been cancelled
CI - Build & Test / Security Check (push) Has been cancelled
CI - Build & Test / Deploy Nexus (push) Has been cancelled
39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Nexus.Api.Data;
|
|
|
|
#nullable disable
|
|
|
|
namespace Nexus.Api.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
[DbContext(typeof(NexusDbContext))]
|
|
[Migration("20260618233002_AddActivityTaskReference")]
|
|
public partial class AddActivityTaskReference : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.Sql(
|
|
"""
|
|
ALTER TABLE "Activity"
|
|
ADD COLUMN IF NOT EXISTS "TaskId" uuid;
|
|
|
|
CREATE INDEX IF NOT EXISTS "IX_Activity_TaskId"
|
|
ON "Activity" ("TaskId");
|
|
""");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.Sql(
|
|
"""
|
|
DROP INDEX IF EXISTS "IX_Activity_TaskId";
|
|
ALTER TABLE "Activity"
|
|
DROP COLUMN IF EXISTS "TaskId";
|
|
""");
|
|
}
|
|
}
|
|
}
|