using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace IRaCIS.Core.Infra.EFCore.Migrations { /// public partial class UserAgreement : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "UserAgreement", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), UserAgreementTypeEnum = table.Column(type: "int", nullable: false), FileName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), FileVersion = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), FileContent = table.Column(type: "nvarchar(max)", nullable: false), UpdateDate = table.Column(type: "datetime2", nullable: false), EffectiveDate = table.Column(type: "datetime2", nullable: false), IsCurrentVersion = table.Column(type: "bit", nullable: false), CreateUserId = table.Column(type: "uniqueidentifier", nullable: false), CreateTime = table.Column(type: "datetime2", nullable: false), UpdateUserId = table.Column(type: "uniqueidentifier", nullable: false), UpdateTime = table.Column(type: "datetime2", nullable: false) }, constraints: table => { table.PrimaryKey("PK_UserAgreement", x => x.Id); table.ForeignKey( name: "FK_UserAgreement_User_CreateUserId", column: x => x.CreateUserId, principalTable: "User", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }, comment: "后台 - 用户协议和隐私采集"); migrationBuilder.CreateIndex( name: "IX_UserAgreement_CreateUserId", table: "UserAgreement", column: "CreateUserId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "UserAgreement"); } } }