using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace IRaCIS.Core.Infra.EFCore.Migrations { /// public partial class hirAddHospital2 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "HIRHospital", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), HospitalName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), HospitalAliasName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), Country = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), City = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), Province = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), Address = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), Phone = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), IsCanConnectInternet = table.Column(type: "bit", nullable: false), HospitalCode = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), HospitalLogoPath = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false), TrialKeepCount = table.Column(type: "int", nullable: false), IsDefault = 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_HIRHospital", x => x.Id); table.ForeignKey( name: "FK_HIRHospital_User_CreateUserId", column: x => x.CreateUserId, principalTable: "User", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_HIRHospital_CreateUserId", table: "HIRHospital", column: "CreateUserId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "HIRHospital"); } } }