using System; using System.Collections.Generic; using Microsoft.EntityFrameworkCore.Migrations; using WorkerService1.Domains; #nullable disable namespace AutoDispathingWork.Migrations { /// public partial class initDb : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "ClientOptions", columns: table => new { Id = table.Column(type: "uuid", nullable: false), ApiGateway = table.Column(type: "text", nullable: false), UserName = table.Column(type: "text", nullable: false), Password = table.Column(type: "text", nullable: false), Delay = table.Column(type: "integer", nullable: false), DispatchingRunning = table.Column(type: "boolean", nullable: false), CloseFileRunning = table.Column(type: "boolean", nullable: false), LoginApi = table.Column(type: "text", nullable: false), GetTaskApi = table.Column(type: "text", nullable: false), GetUserApi = table.Column(type: "text", nullable: false), DiposeOrder = table.Column(type: "text", nullable: false), CloseFileApi = table.Column(type: "text", nullable: false), GetCamerasApi = table.Column(type: "text", nullable: false) }, constraints: table => { table.PrimaryKey("PK_ClientOptions", x => x.Id); }); migrationBuilder.CreateTable( name: "LogInfos", columns: table => new { Id = table.Column(type: "uuid", nullable: false), Message = table.Column(type: "text", nullable: false), From = table.Column(type: "text", nullable: false), Level = table.Column(type: "text", nullable: false), CreateTime = table.Column(type: "timestamp with time zone", nullable: false) }, constraints: table => { table.PrimaryKey("PK_LogInfos", x => x.Id); }); migrationBuilder.CreateTable( name: "Polygons", columns: table => new { PolygonId = table.Column(type: "uuid", nullable: false), Name = table.Column(type: "text", nullable: false), UserId = table.Column(type: "text", nullable: true), UserName = table.Column(type: "text", nullable: true), Points = table.Column>>(type: "jsonb", nullable: true), RangeCameras = table.Column>(type: "jsonb", nullable: true) }, constraints: table => { table.PrimaryKey("PK_Polygons", x => x.PolygonId); }); migrationBuilder.CreateIndex( name: "IX_LogInfos_CreateTime", table: "LogInfos", column: "CreateTime"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "ClientOptions"); migrationBuilder.DropTable( name: "LogInfos"); migrationBuilder.DropTable( name: "Polygons"); } } }