sunpengfei
2025-11-20 1deb3d68f4caf2f54107e67c991ec9e50b360fa0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using System;
using Microsoft.EntityFrameworkCore.Migrations;
 
#nullable disable
 
namespace ApiTools.Database.Migrations.Migrations
{
    /// <inheritdoc />
    public partial class UpdateSmsSetting1009 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_SmsSettingAccess_Channel_ChannelId",
                table: "SmsSettingAccess");
 
            migrationBuilder.DropIndex(
                name: "IX_SmsSettingAccess_ChannelId",
                table: "SmsSettingAccess");
 
            migrationBuilder.DropColumn(
                name: "ChannelId",
                table: "SmsSettingAccess");
 
            migrationBuilder.AddColumn<string>(
                name: "SignName",
                table: "SmsSettingAccess",
                type: "nvarchar(max)",
                nullable: true);
        }
 
        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "SignName",
                table: "SmsSettingAccess");
 
            migrationBuilder.AddColumn<Guid>(
                name: "ChannelId",
                table: "SmsSettingAccess",
                type: "uniqueidentifier",
                nullable: true);
 
            migrationBuilder.CreateIndex(
                name: "IX_SmsSettingAccess_ChannelId",
                table: "SmsSettingAccess",
                column: "ChannelId");
 
            migrationBuilder.AddForeignKey(
                name: "FK_SmsSettingAccess_Channel_ChannelId",
                table: "SmsSettingAccess",
                column: "ChannelId",
                principalTable: "Channel",
                principalColumn: "Id");
        }
    }
}