55 lines
1.9 KiB
C#
55 lines
1.9 KiB
C#
using System.Collections.Generic;
|
|
using Commerce.Contracts.DTOs;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Commerce.Domain.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class MakeTechnicalDetailsNullable : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<Dictionary<string, List<TechnicalDetail>>>(
|
|
name: "TechnicalDetails",
|
|
table: "Products",
|
|
type: "jsonb",
|
|
nullable: true,
|
|
oldClrType: typeof(Dictionary<string, List<TechnicalDetail>>),
|
|
oldType: "jsonb");
|
|
|
|
migrationBuilder.AlterColumn<Dictionary<string, List<TechnicalDetail>>>(
|
|
name: "TechnicalDetails",
|
|
table: "Categories",
|
|
type: "jsonb",
|
|
nullable: true,
|
|
oldClrType: typeof(Dictionary<string, List<TechnicalDetail>>),
|
|
oldType: "jsonb");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<Dictionary<string, List<TechnicalDetail>>>(
|
|
name: "TechnicalDetails",
|
|
table: "Products",
|
|
type: "jsonb",
|
|
nullable: false,
|
|
oldClrType: typeof(Dictionary<string, List<TechnicalDetail>>),
|
|
oldType: "jsonb",
|
|
oldNullable: true);
|
|
|
|
migrationBuilder.AlterColumn<Dictionary<string, List<TechnicalDetail>>>(
|
|
name: "TechnicalDetails",
|
|
table: "Categories",
|
|
type: "jsonb",
|
|
nullable: false,
|
|
oldClrType: typeof(Dictionary<string, List<TechnicalDetail>>),
|
|
oldType: "jsonb",
|
|
oldNullable: true);
|
|
}
|
|
}
|
|
}
|