using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace TeamUp.Modules.OrgBoard.Persistence.Migrations
{
///
public partial class AddAgents : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "agents",
schema: "orgboard",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
SeatId = table.Column(type: "uuid", nullable: false),
Name = table.Column(type: "character varying(120)", maxLength: 120, nullable: false),
Monogram = table.Column(type: "character varying(8)", maxLength: 8, nullable: true),
Autonomy = table.Column(type: "character varying(20)", maxLength: 20, nullable: false),
ApiConfigId = table.Column(type: "uuid", nullable: false),
FallbackApiConfigId = table.Column(type: "uuid", nullable: true),
SkillKeys = table.Column>(type: "text[]", nullable: false),
Docs = table.Column>(type: "text[]", nullable: false),
CreatedAtUtc = table.Column(type: "timestamp with time zone", nullable: false),
UpdatedAtUtc = table.Column(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);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "agents",
schema: "orgboard");
}
}
}