using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using vendorApproverBackend.Entities;
#nullable disable
namespace vendorApproverBackend.Migrations
{
///
public partial class AddPqRequestCLarification : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "pq_request_clarifications",
columns: table => new
{
id = table.Column(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
prequalification_request_id = table.Column(type: "bigint", nullable: true),
step_observations = table.Column>(type: "jsonb", nullable: true),
sender_role = table.Column(type: "integer", nullable: true),
receiver_role = table.Column(type: "integer", nullable: true),
deadline_reply = table.Column(type: "timestamp without time zone", nullable: true),
comment = table.Column(type: "text", nullable: true),
timestamp = table.Column(type: "timestamp without time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_pq_request_clarifications", x => x.id);
table.ForeignKey(
name: "FK_pq_request_clarifications_PrequalificationRequests_prequali~",
column: x => x.prequalification_request_id,
principalTable: "PrequalificationRequests",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_pq_request_clarifications_prequalification_request_id",
table: "pq_request_clarifications",
column: "prequalification_request_id");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "pq_request_clarifications");
}
}
}