64 lines
2.1 KiB
C#
64 lines
2.1 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace TakeoutSaaS.Infrastructure.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class ChangeStoreQualificationDateColumns : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<DateOnly>(
|
|
name: "IssuedAt",
|
|
table: "store_qualifications",
|
|
type: "date",
|
|
nullable: true,
|
|
comment: "签发日期。",
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone",
|
|
oldNullable: true,
|
|
oldComment: "签发日期。");
|
|
|
|
migrationBuilder.AlterColumn<DateOnly>(
|
|
name: "ExpiresAt",
|
|
table: "store_qualifications",
|
|
type: "date",
|
|
nullable: true,
|
|
comment: "到期日期。",
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "timestamp with time zone",
|
|
oldNullable: true,
|
|
oldComment: "到期日期。");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "IssuedAt",
|
|
table: "store_qualifications",
|
|
type: "timestamp with time zone",
|
|
nullable: true,
|
|
comment: "签发日期。",
|
|
oldClrType: typeof(DateOnly),
|
|
oldType: "date",
|
|
oldNullable: true,
|
|
oldComment: "签发日期。");
|
|
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "ExpiresAt",
|
|
table: "store_qualifications",
|
|
type: "timestamp with time zone",
|
|
nullable: true,
|
|
comment: "到期日期。",
|
|
oldClrType: typeof(DateOnly),
|
|
oldType: "date",
|
|
oldNullable: true,
|
|
oldComment: "到期日期。");
|
|
}
|
|
}
|
|
}
|