57 lines
1.6 KiB
C#
57 lines
1.6 KiB
C#
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);
|
|
}
|
|
}
|
|
}
|