41 lines
1.2 KiB
C#
41 lines
1.2 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace gehGassiApp.Data.Migrations
|
|
{
|
|
public partial class AppUserTermsAdded : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "TermsAccepted",
|
|
table: "AppUsers",
|
|
type: "INTEGER",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.AddColumn<long>(
|
|
name: "TermsAcceptedDate",
|
|
table: "AppUsers",
|
|
type: "INTEGER",
|
|
nullable: true);
|
|
|
|
migrationBuilder.Sql("UPDATE AppUsers SET TermsAccepted = 1, TermsAcceptedDate = Created");
|
|
|
|
System.Diagnostics.Debug.WriteLine($"Migration AppUserTermsAdded done");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "TermsAccepted",
|
|
table: "AppUsers");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "TermsAcceptedDate",
|
|
table: "AppUsers");
|
|
}
|
|
}
|
|
}
|