-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- also updates to license expression, NO LICENSE CHANGE
- Loading branch information
Ovan Crone
committed
Jan 3, 2019
1 parent
d4dd0c0
commit 40d6b24
Showing
12 changed files
with
336 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
112 changes: 112 additions & 0 deletions
112
...ntityFrameworkCore.Migrations.SqlServer/Migrations/20190103114758_shrink-keys.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
210 changes: 210 additions & 0 deletions
210
...REstate.EntityFrameworkCore.Migrations.SqlServer/Migrations/20190103114758_shrink-keys.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,210 @@ | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
namespace REstate.EntityFrameworkCore.Migrations.SqlServer.Migrations | ||
{ | ||
public partial class ShrinkKeys : Migration | ||
{ | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropForeignKey( | ||
name: "FK_MetadataEntries_Machines_MachineId", | ||
table: "MetadataEntries"); | ||
|
||
migrationBuilder.DropForeignKey( | ||
name: "FK_StateBagEntries_Machines_MachineId", | ||
table: "StateBagEntries"); | ||
|
||
migrationBuilder.DropPrimaryKey( | ||
name: "PK_Machines", | ||
table: "Machines"); | ||
|
||
migrationBuilder.DropPrimaryKey( | ||
name: "PK_MetadataEntries", | ||
table: "MetadataEntries"); | ||
|
||
migrationBuilder.DropPrimaryKey( | ||
name: "PK_StateBagEntries", | ||
table: "StateBagEntries"); | ||
|
||
migrationBuilder.AlterColumn<string>( | ||
name: "MachineId", | ||
table: "Machines", | ||
unicode: false, | ||
maxLength: 450, | ||
nullable: false, | ||
oldClrType: typeof(string), | ||
oldUnicode: false); | ||
|
||
migrationBuilder.AlterColumn<string>( | ||
name: "Key", | ||
table: "StateBagEntries", | ||
unicode: false, | ||
maxLength: 450, | ||
nullable: false, | ||
oldClrType: typeof(string), | ||
oldUnicode: false); | ||
|
||
migrationBuilder.AlterColumn<string>( | ||
name: "MachineId", | ||
table: "StateBagEntries", | ||
unicode: false, | ||
maxLength: 450, | ||
nullable: false, | ||
oldClrType: typeof(string), | ||
oldUnicode: false); | ||
|
||
migrationBuilder.AlterColumn<string>( | ||
name: "Key", | ||
table: "MetadataEntries", | ||
unicode: false, | ||
maxLength: 450, | ||
nullable: false, | ||
oldClrType: typeof(string), | ||
oldUnicode: false); | ||
|
||
migrationBuilder.AlterColumn<string>( | ||
name: "MachineId", | ||
table: "MetadataEntries", | ||
unicode: false, | ||
maxLength: 450, | ||
nullable: false, | ||
oldClrType: typeof(string), | ||
oldUnicode: false); | ||
|
||
migrationBuilder.AddPrimaryKey( | ||
name: "PK_Machines", | ||
table: "Machines", | ||
column: "MachineId"); | ||
|
||
migrationBuilder.AddPrimaryKey( | ||
name: "PK_MetadataEntries", | ||
table: "MetadataEntries", | ||
columns: new[] { "MachineId", "Key" }); | ||
|
||
migrationBuilder.AddPrimaryKey( | ||
name: "PK_StateBagEntries", | ||
table: "StateBagEntries", | ||
columns: new[] { "MachineId", "Key" }); | ||
|
||
migrationBuilder.AddForeignKey( | ||
name: "FK_MetadataEntries_Machines_MachineId", | ||
table: "MetadataEntries", | ||
column: "MachineId", | ||
principalTable: "Machines", | ||
principalColumn: "MachineId", | ||
onDelete: ReferentialAction.Cascade); | ||
|
||
migrationBuilder.AddForeignKey( | ||
name: "FK_StateBagEntries_Machines_MachineId", | ||
table: "StateBagEntries", | ||
column: "MachineId", | ||
principalTable: "Machines", | ||
principalColumn: "MachineId", | ||
onDelete: ReferentialAction.Cascade); | ||
} | ||
|
||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropForeignKey( | ||
name: "FK_MetadataEntries_Machines_MachineId", | ||
table: "MetadataEntries"); | ||
|
||
migrationBuilder.DropForeignKey( | ||
name: "FK_StateBagEntries_Machines_MachineId", | ||
table: "StateBagEntries"); | ||
|
||
migrationBuilder.DropPrimaryKey( | ||
name: "PK_Machines", | ||
table: "Machines"); | ||
|
||
migrationBuilder.DropPrimaryKey( | ||
name: "PK_MetadataEntries", | ||
table: "MetadataEntries"); | ||
|
||
migrationBuilder.DropPrimaryKey( | ||
name: "PK_StateBagEntries", | ||
table: "StateBagEntries"); | ||
|
||
migrationBuilder.AlterColumn<string>( | ||
name: "Key", | ||
table: "StateBagEntries", | ||
unicode: false, | ||
nullable: false, | ||
maxLength: 900, | ||
oldClrType: typeof(string), | ||
oldUnicode: false, | ||
oldMaxLength: 450); | ||
|
||
migrationBuilder.AlterColumn<string>( | ||
name: "MachineId", | ||
table: "StateBagEntries", | ||
unicode: false, | ||
nullable: false, | ||
maxLength: 900, | ||
oldClrType: typeof(string), | ||
oldUnicode: false, | ||
oldMaxLength: 450); | ||
|
||
migrationBuilder.AlterColumn<string>( | ||
name: "Key", | ||
table: "MetadataEntries", | ||
unicode: false, | ||
nullable: false, | ||
maxLength: 900, | ||
oldClrType: typeof(string), | ||
oldUnicode: false, | ||
oldMaxLength: 450); | ||
|
||
migrationBuilder.AlterColumn<string>( | ||
name: "MachineId", | ||
table: "MetadataEntries", | ||
unicode: false, | ||
nullable: false, | ||
maxLength: 900, | ||
oldClrType: typeof(string), | ||
oldUnicode: false, | ||
oldMaxLength: 450); | ||
|
||
migrationBuilder.AlterColumn<string>( | ||
name: "MachineId", | ||
table: "Machines", | ||
unicode: false, | ||
nullable: false, | ||
maxLength: 900, | ||
oldClrType: typeof(string), | ||
oldUnicode: false, | ||
oldMaxLength: 450); | ||
|
||
migrationBuilder.AddPrimaryKey( | ||
name: "PK_Machines", | ||
table: "Machines", | ||
column: "MachineId"); | ||
|
||
migrationBuilder.AddPrimaryKey( | ||
name: "PK_MetadataEntries", | ||
table: "MetadataEntries", | ||
columns: new[] { "MachineId", "Key" }); | ||
|
||
migrationBuilder.AddPrimaryKey( | ||
name: "PK_StateBagEntries", | ||
table: "StateBagEntries", | ||
columns: new[] { "MachineId", "Key" }); | ||
|
||
migrationBuilder.AddForeignKey( | ||
name: "FK_MetadataEntries_Machines_MachineId", | ||
table: "MetadataEntries", | ||
column: "MachineId", | ||
principalTable: "Machines", | ||
principalColumn: "MachineId", | ||
onDelete: ReferentialAction.Cascade); | ||
|
||
migrationBuilder.AddForeignKey( | ||
name: "FK_StateBagEntries_Machines_MachineId", | ||
table: "StateBagEntries", | ||
column: "MachineId", | ||
principalTable: "Machines", | ||
principalColumn: "MachineId", | ||
onDelete: ReferentialAction.Cascade); | ||
} | ||
} | ||
} |
Oops, something went wrong.