using Microsoft.EntityFrameworkCore.Migrations;
|
|
#nullable disable
|
|
namespace FlexJobApi.Database.Migrations.Migrations
|
{
|
/// <inheritdoc />
|
public partial class UpdateUserAuth0911002 : Migration
|
{
|
/// <inheritdoc />
|
protected override void Up(MigrationBuilder migrationBuilder)
|
{
|
migrationBuilder.Sql(@"
|
UPDATE [User] SET RealMethod = (
|
SELECT
|
CASE
|
WHEN FaceRealUrl IS NULL THEN (
|
CASE
|
WHEN BankCard IS NULL THEN 10
|
ELSE 20
|
END
|
)
|
ELSE 30
|
END
|
FROM UserAuth
|
WHERE UserAuth.Id = [User].Id
|
)
|
WHERE IsReal = 1");
|
}
|
|
/// <inheritdoc />
|
protected override void Down(MigrationBuilder migrationBuilder)
|
{
|
|
}
|
}
|
}
|