using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace CMSMicroservice.Infrastructure.Persistence.Migrations { /// public partial class u02 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "IsMobileVerified", schema: "CMS", table: "Users", type: "bit", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "MobileVerifiedAt", schema: "CMS", table: "Users", type: "datetime2", nullable: true); migrationBuilder.AddColumn( name: "ReferralCode", schema: "CMS", table: "Users", type: "nvarchar(max)", nullable: false, defaultValue: ""); migrationBuilder.CreateTable( name: "OtpTokens", schema: "CMS", columns: table => new { Id = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Mobile = table.Column(type: "nvarchar(max)", nullable: false), Purpose = table.Column(type: "nvarchar(max)", nullable: false), CodeHash = table.Column(type: "nvarchar(max)", nullable: false), ExpiresAt = table.Column(type: "datetime2", nullable: false), Attempts = table.Column(type: "int", nullable: false), IsUsed = table.Column(type: "bit", nullable: false), Created = table.Column(type: "datetime2", nullable: false), CreatedBy = table.Column(type: "nvarchar(max)", nullable: true), LastModified = table.Column(type: "datetime2", nullable: true), LastModifiedBy = table.Column(type: "nvarchar(max)", nullable: true), IsDeleted = table.Column(type: "bit", nullable: false) }, constraints: table => { table.PrimaryKey("PK_OtpTokens", x => x.Id); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "OtpTokens", schema: "CMS"); migrationBuilder.DropColumn( name: "IsMobileVerified", schema: "CMS", table: "Users"); migrationBuilder.DropColumn( name: "MobileVerifiedAt", schema: "CMS", table: "Users"); migrationBuilder.DropColumn( name: "ReferralCode", schema: "CMS", table: "Users"); } } }