Files
ECommerce/ECommerce.Domain/Migrations/20260120132648_QueryableTranslations.cs
T

55 lines
1.7 KiB
C#

using System.Collections.Generic;
using Commerce.Domain.Entities;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Commerce.Domain.Migrations
{
/// <inheritdoc />
public partial class QueryableTranslations : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Translations",
table: "Products",
type: "jsonb",
nullable: true,
oldClrType: typeof(List<ProductTranslation>),
oldType: "jsonb");
migrationBuilder.AlterColumn<string>(
name: "Translations",
table: "Categories",
type: "jsonb",
nullable: true,
oldClrType: typeof(List<CategoryTranslation>),
oldType: "jsonb");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<List<ProductTranslation>>(
name: "Translations",
table: "Products",
type: "jsonb",
nullable: false,
oldClrType: typeof(string),
oldType: "jsonb",
oldNullable: true);
migrationBuilder.AlterColumn<List<CategoryTranslation>>(
name: "Translations",
table: "Categories",
type: "jsonb",
nullable: false,
oldClrType: typeof(string),
oldType: "jsonb",
oldNullable: true);
}
}
}