初始化
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FutureMailAPI.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddSentMailCreatedAt : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_TimeCapsules_SentMailId",
|
||||
table: "TimeCapsules");
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "GlowIntensity",
|
||||
table: "TimeCapsules",
|
||||
type: "REAL",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Style",
|
||||
table: "TimeCapsules",
|
||||
type: "TEXT",
|
||||
maxLength: 50,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "CreatedAt",
|
||||
table: "SentMails",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TimeCapsules_SentMailId",
|
||||
table: "TimeCapsules",
|
||||
column: "SentMailId",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_TimeCapsules_SentMailId",
|
||||
table: "TimeCapsules");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "GlowIntensity",
|
||||
table: "TimeCapsules");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Style",
|
||||
table: "TimeCapsules");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CreatedAt",
|
||||
table: "SentMails");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TimeCapsules_SentMailId",
|
||||
table: "TimeCapsules",
|
||||
column: "SentMailId");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user