chore: 补全 Apple Sign-In 迁移 + 调低开发环境日志级别

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-07-10 05:37:24 +00:00
parent bd4350c17f
commit ec5af19d30
4 changed files with 1529 additions and 2 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,56 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Health.Infrastructure.Data.Migrations
{
/// <inheritdoc />
public partial class AddAppleSignIn : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Phone",
table: "Users",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AddColumn<string>(
name: "AppleUserId",
table: "Users",
type: "text",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_Users_AppleUserId",
table: "Users",
column: "AppleUserId",
unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_Users_AppleUserId",
table: "Users");
migrationBuilder.DropColumn(
name: "AppleUserId",
table: "Users");
migrationBuilder.AlterColumn<string>(
name: "Phone",
table: "Users",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
}
}
}

View File

@@ -803,6 +803,9 @@ namespace Health.Infrastructure.Data.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("uuid"); .HasColumnType("uuid");
b.Property<string>("AppleUserId")
.HasColumnType("text");
b.Property<string>("AvatarUrl") b.Property<string>("AvatarUrl")
.HasColumnType("text"); .HasColumnType("text");
@@ -822,7 +825,6 @@ namespace Health.Infrastructure.Data.Migrations
.HasColumnType("text"); .HasColumnType("text");
b.Property<string>("Phone") b.Property<string>("Phone")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<string>("Role") b.Property<string>("Role")
@@ -837,6 +839,9 @@ namespace Health.Infrastructure.Data.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("AppleUserId")
.IsUnique();
b.HasIndex("DoctorId"); b.HasIndex("DoctorId");
b.HasIndex("Phone") b.HasIndex("Phone")

View File

@@ -1,7 +1,7 @@
{ {
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {
"Default": "Information", "Default": "Warning",
"Microsoft.AspNetCore": "Warning" "Microsoft.AspNetCore": "Warning"
} }
} }