using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace mws.backend.dotnet.infrastructure.Migrations { /// public partial class AddMasterData : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "master_data", columns: table => new { Id = table.Column(type: "uuid", nullable: false), Group = table.Column(type: "character varying(100)", maxLength: 100, nullable: false), Label = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), Value = table.Column(type: "character varying(100)", maxLength: 100, nullable: false), SortOrder = table.Column(type: "integer", nullable: false), IsActive = table.Column(type: "boolean", nullable: false), CreatedAt = table.Column(type: "timestamp with time zone", nullable: false), UpdatedAt = table.Column(type: "timestamp with time zone", nullable: false) }, constraints: table => { table.PrimaryKey("PK_master_data", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_master_data_Group_Value", table: "master_data", columns: new[] { "Group", "Value" }, unique: true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "master_data"); } } }