using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; namespace KanSan.Base.Migrations { public partial class GueteschutzHinzugefügt : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "Infiltation", table: "Schaeden", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "RissBruchScherbe", table: "Schaeden", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "SchadstelleFaekalienFrei", table: "Schaeden", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "StutzenEinragend", table: "Schaeden", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "VorbehandeltFraeser", table: "Schaeden", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "VorbehandeltHD", table: "Schaeden", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "VorbehandeltMech", table: "Schaeden", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "WurzelInkrustationAblagerungen", table: "Schaeden", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "BaustellensicherungErforderlich", table: "Kanaele", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "GenehmigungErforderlich", table: "Kanaele", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "HaltungGespuelt", table: "Kanaele", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "RohrleitungInBetrieb", table: "Kanaele", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "WasserHaltungDurchgefuehrt", table: "Kanaele", nullable: false, defaultValue: false); migrationBuilder.CreateTable( name: "HutprofilSanierung", columns: table => new { ID = table.Column(nullable: false) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), GuidNr = table.Column(nullable: false), SchadPositionID = table.Column(nullable: true), Wetter = table.Column(nullable: false), AussenTemp = table.Column(nullable: false), KanalTemp = table.Column(nullable: false), Sichtkontrolle = table.Column(nullable: false), Bericht = table.Column(nullable: false), Film = table.Column(nullable: false), Video = table.Column(nullable: false), Dichtheit = table.Column(nullable: false), HarzmaterialHersteller = table.Column(nullable: true), HarzMaterialArt = table.Column(nullable: true), KompACharge = table.Column(nullable: true), KompBCharge = table.Column(nullable: true), TraegerKurzliner = table.Column(nullable: true), TraegerHersteller = table.Column(nullable: true), TraegerCharge = table.Column(nullable: true), Flaechengewicht = table.Column(nullable: false), Auffaelligkeit = table.Column(nullable: false), FixierungAufPacker = table.Column(nullable: false), MischZeit = table.Column(nullable: false), AnpressenPacker = table.Column(nullable: false), EntlueftenPacker = table.Column(nullable: false), PackerDruckAnfang = table.Column(nullable: false), PackerDruckEnde = table.Column(nullable: false), RohrDN = table.Column(nullable: true), Winkel = table.Column(nullable: true), InnenBeschichtung = table.Column(nullable: false), SeitenKanalDruckAnfang = table.Column(nullable: false), SeitenKanalDruckEnde = table.Column(nullable: false) }, constraints: table => { table.PrimaryKey("PK_HutprofilSanierung", x => x.ID); table.ForeignKey( name: "FK_HutprofilSanierung_Schaeden_SchadPositionID", column: x => x.SchadPositionID, principalTable: "Schaeden", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "KurzlinerSanierung", columns: table => new { ID = table.Column(nullable: false) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), GuidNr = table.Column(nullable: false), SchadPositionID = table.Column(nullable: true), Wetter = table.Column(nullable: false), AussenTemp = table.Column(nullable: false), KanalTemp = table.Column(nullable: false), Sichtkontrolle = table.Column(nullable: false), Bericht = table.Column(nullable: false), Film = table.Column(nullable: false), Video = table.Column(nullable: false), Dichtheit = table.Column(nullable: false), HarzmaterialHersteller = table.Column(nullable: true), HarzMaterialArt = table.Column(nullable: true), KompACharge = table.Column(nullable: true), KompBCharge = table.Column(nullable: true), TraegerKurzliner = table.Column(nullable: true), TraegerHersteller = table.Column(nullable: true), TraegerCharge = table.Column(nullable: true), Flaechengewicht = table.Column(nullable: false), Auffaelligkeit = table.Column(nullable: false), FixierungAufPacker = table.Column(nullable: false), MischZeit = table.Column(nullable: false), AnpressenPacker = table.Column(nullable: false), EntlueftenPacker = table.Column(nullable: false), PackerDruckAnfang = table.Column(nullable: false), PackerDruckEnde = table.Column(nullable: false), Lang = table.Column(nullable: false), Breit = table.Column(nullable: false) }, constraints: table => { table.PrimaryKey("PK_KurzlinerSanierung", x => x.ID); table.ForeignKey( name: "FK_KurzlinerSanierung_Schaeden_SchadPositionID", column: x => x.SchadPositionID, principalTable: "Schaeden", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateIndex( name: "IX_HutprofilSanierung_SchadPositionID", table: "HutprofilSanierung", column: "SchadPositionID"); migrationBuilder.CreateIndex( name: "IX_KurzlinerSanierung_SchadPositionID", table: "KurzlinerSanierung", column: "SchadPositionID"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "HutprofilSanierung"); migrationBuilder.DropTable( name: "KurzlinerSanierung"); migrationBuilder.DropColumn( name: "Infiltation", table: "Schaeden"); migrationBuilder.DropColumn( name: "RissBruchScherbe", table: "Schaeden"); migrationBuilder.DropColumn( name: "SchadstelleFaekalienFrei", table: "Schaeden"); migrationBuilder.DropColumn( name: "StutzenEinragend", table: "Schaeden"); migrationBuilder.DropColumn( name: "VorbehandeltFraeser", table: "Schaeden"); migrationBuilder.DropColumn( name: "VorbehandeltHD", table: "Schaeden"); migrationBuilder.DropColumn( name: "VorbehandeltMech", table: "Schaeden"); migrationBuilder.DropColumn( name: "WurzelInkrustationAblagerungen", table: "Schaeden"); migrationBuilder.DropColumn( name: "BaustellensicherungErforderlich", table: "Kanaele"); migrationBuilder.DropColumn( name: "GenehmigungErforderlich", table: "Kanaele"); migrationBuilder.DropColumn( name: "HaltungGespuelt", table: "Kanaele"); migrationBuilder.DropColumn( name: "RohrleitungInBetrieb", table: "Kanaele"); migrationBuilder.DropColumn( name: "WasserHaltungDurchgefuehrt", table: "Kanaele"); } } }