0
0
RhSolutions-Api/RhSolutions.Api/Migrations/20240117210635_Init.cs

49 lines
1.9 KiB
C#
Raw Normal View History

2022-12-14 09:53:10 +03:00
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace RhSolutions.Api.Migrations
{
/// <inheritdoc />
public partial class Init : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Products",
columns: table => new
{
2023-05-11 07:55:26 +03:00
Id = table.Column<string>(type: "text", nullable: false),
2022-12-14 09:53:10 +03:00
Name = table.Column<string>(type: "text", nullable: false),
2023-05-11 07:55:26 +03:00
ProductSku = table.Column<string>(type: "text", nullable: false),
2024-01-18 22:32:40 +03:00
DeprecatedSkus = table.Column<string[]>(type: "text[]", nullable: false),
2023-05-11 07:55:26 +03:00
ProductLines = table.Column<List<string>>(type: "text[]", nullable: false),
IsOnWarehouse = table.Column<bool>(type: "boolean", nullable: false),
2022-12-14 09:53:10 +03:00
ProductMeasure = table.Column<int>(type: "integer", nullable: false),
DeliveryMakeUp = table.Column<double>(type: "double precision", nullable: true),
2023-05-11 07:55:26 +03:00
Price = table.Column<decimal>(type: "numeric", nullable: false)
2022-12-14 09:53:10 +03:00
},
constraints: table =>
{
table.PrimaryKey("PK_Products", x => x.Id);
});
2024-01-18 22:32:40 +03:00
migrationBuilder.CreateIndex(
name: "IX_Products_Name",
table: "Products",
column: "Name")
.Annotation("Npgsql:IndexMethod", "GIN")
.Annotation("Npgsql:TsVectorConfig", "russian");
2022-12-14 09:53:10 +03:00
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Products");
}
}
}