Created
January 21, 2019 16:33
-
-
Save MartinZikmund/2a4e74fff9b788fe43bab3a453423498 to your computer and use it in GitHub Desktop.
Invalid migration - this is not really what we wanted...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override void Up(MigrationBuilder migrationBuilder) | |
{ | |
migrationBuilder.DropTable( | |
name: "Cows"); | |
migrationBuilder.DropPrimaryKey( | |
name: "PK_Horses", | |
table: "Horses"); | |
migrationBuilder.DropColumn( | |
name: "Id", | |
table: "Horses"); | |
migrationBuilder.RenameTable( | |
name: "Horses", | |
newName: "Animal"); | |
migrationBuilder.AlterColumn<int>( | |
name: "MaxJumpHeight", | |
table: "Animal", | |
nullable: true, | |
oldClrType: typeof(int)); | |
migrationBuilder.AddColumn<int>( | |
name: "Number", | |
table: "Animal", | |
nullable: false, | |
defaultValue: 0); | |
migrationBuilder.AddColumn<int>( | |
name: "Year", | |
table: "Animal", | |
nullable: false, | |
defaultValue: 0); | |
migrationBuilder.AddColumn<string>( | |
name: "Discriminator", | |
table: "Animal", | |
nullable: false, | |
defaultValue: ""); | |
migrationBuilder.AddColumn<int>( | |
name: "Weight", | |
table: "Animal", | |
nullable: true); | |
migrationBuilder.AddPrimaryKey( | |
name: "PK_Animal", | |
table: "Animal", | |
columns: new[] { "Number", "Year" }); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment