This commit is contained in:
mmrbnjd
2025-08-16 01:12:45 +03:30
parent eeb659a0df
commit 029a10e1af
8 changed files with 621 additions and 5 deletions

View File

@@ -0,0 +1,48 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Hushian.Persistence.Migrations
{
/// <inheritdoc />
public partial class tbpromt : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "prompts",
columns: table => new
{
ID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Cdatetime = table.Column<DateTime>(type: "datetime2", nullable: false),
CompanyID = table.Column<int>(type: "int", nullable: false),
Test = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_prompts", x => x.ID);
table.ForeignKey(
name: "FK_prompts_Companies_CompanyID",
column: x => x.CompanyID,
principalTable: "Companies",
principalColumn: "ID",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_prompts_CompanyID",
table: "prompts",
column: "CompanyID");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "prompts");
}
}
}