54 lines
2.2 KiB
C#
54 lines
2.2 KiB
C#
|
|
using System;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||
|
|
|
||
|
|
#nullable disable
|
||
|
|
|
||
|
|
namespace TeamUp.Modules.OrgBoard.Persistence.Migrations
|
||
|
|
{
|
||
|
|
/// <inheritdoc />
|
||
|
|
public partial class AddAgents : Migration
|
||
|
|
{
|
||
|
|
/// <inheritdoc />
|
||
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||
|
|
{
|
||
|
|
migrationBuilder.CreateTable(
|
||
|
|
name: "agents",
|
||
|
|
schema: "orgboard",
|
||
|
|
columns: table => new
|
||
|
|
{
|
||
|
|
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||
|
|
SeatId = table.Column<Guid>(type: "uuid", nullable: false),
|
||
|
|
Name = table.Column<string>(type: "character varying(120)", maxLength: 120, nullable: false),
|
||
|
|
Monogram = table.Column<string>(type: "character varying(8)", maxLength: 8, nullable: true),
|
||
|
|
Autonomy = table.Column<string>(type: "character varying(20)", maxLength: 20, nullable: false),
|
||
|
|
ApiConfigId = table.Column<Guid>(type: "uuid", nullable: false),
|
||
|
|
FallbackApiConfigId = table.Column<Guid>(type: "uuid", nullable: true),
|
||
|
|
SkillKeys = table.Column<List<string>>(type: "text[]", nullable: false),
|
||
|
|
Docs = table.Column<List<string>>(type: "text[]", nullable: false),
|
||
|
|
CreatedAtUtc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
|
||
|
|
UpdatedAtUtc = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false)
|
||
|
|
},
|
||
|
|
constraints: table =>
|
||
|
|
{
|
||
|
|
table.PrimaryKey("PK_agents", x => x.Id);
|
||
|
|
});
|
||
|
|
|
||
|
|
migrationBuilder.CreateIndex(
|
||
|
|
name: "IX_agents_SeatId",
|
||
|
|
schema: "orgboard",
|
||
|
|
table: "agents",
|
||
|
|
column: "SeatId",
|
||
|
|
unique: true);
|
||
|
|
}
|
||
|
|
|
||
|
|
/// <inheritdoc />
|
||
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||
|
|
{
|
||
|
|
migrationBuilder.DropTable(
|
||
|
|
name: "agents",
|
||
|
|
schema: "orgboard");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|