using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace gehGassi.Persistence.Migrations { public partial class DogWalkerPofilesAndCertificatesAdded : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Certificates", columns: table => new { Id = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), AppUserId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), FileName = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: false), Status = table.Column(type: "int", nullable: false), VerificationDate = table.Column(type: "datetimeoffset", nullable: true), VerifiedBy = table.Column(type: "nvarchar(255)", maxLength: 255, nullable: true), VerificationComment = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), InternalComment = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), Created = table.Column(type: "datetimeoffset", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Certificates", x => x.Id); table.ForeignKey( name: "FK_Certificates_AppUsers_AppUserId", column: x => x.AppUserId, principalTable: "AppUsers", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "DogWalkerProfiles", columns: table => new { Id = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Radius = table.Column(type: "float", nullable: false), About = table.Column(type: "nvarchar(300)", maxLength: 300, nullable: true), AllowedRequests = table.Column(type: "int", nullable: false), PuppyAllowed = table.Column(type: "bit", nullable: false), DifficultAllowed = table.Column(type: "bit", nullable: false), AggressionLevel = table.Column(type: "int", nullable: false), AcceptedSize = table.Column(type: "int", nullable: false), PriceWalk = table.Column(type: "decimal(18,2)", nullable: false), PriceDay = table.Column(type: "decimal(18,2)", nullable: false), PriceSitting = table.Column(type: "decimal(18,2)", nullable: false), Index = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Version = table.Column(type: "rowversion", rowVersion: true, nullable: true), UpdatedAt = table.Column(type: "datetimeoffset", nullable: false), Deleted = table.Column(type: "bit", nullable: false) }, constraints: table => { table.PrimaryKey("PK_DogWalkerProfiles", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_Certificates_AppUserId", table: "Certificates", column: "AppUserId"); migrationBuilder.CreateIndex( name: "IX_DogWalkerProfiles_Index", table: "DogWalkerProfiles", column: "Index"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Certificates"); migrationBuilder.DropTable( name: "DogWalkerProfiles"); } } }