using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ManagerService.Migrations
{
///
public partial class AddVisitEvent : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "VisitEvents",
columns: table => new
{
Id = table.Column(type: "text", nullable: false),
InstanceId = table.Column(type: "text", nullable: false),
ConfigurationId = table.Column(type: "text", nullable: true),
SectionId = table.Column(type: "text", nullable: true),
SessionId = table.Column(type: "text", nullable: false),
EventType = table.Column(type: "integer", nullable: false),
AppType = table.Column(type: "integer", nullable: false),
Language = table.Column(type: "text", nullable: true),
DurationSeconds = table.Column(type: "integer", nullable: true),
Metadata = table.Column(type: "text", nullable: true),
Timestamp = table.Column(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_VisitEvents", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_VisitEvents_InstanceId",
table: "VisitEvents",
column: "InstanceId");
migrationBuilder.CreateIndex(
name: "IX_VisitEvents_Timestamp",
table: "VisitEvents",
column: "Timestamp");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "VisitEvents");
}
}
}