-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9cda63
commit 98bb8af
Showing
4 changed files
with
310 additions
and
4 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
220 changes: 220 additions & 0 deletions
220
...ervice.Database/Migrations/20231019201444_FixCaseSensitive_Key_CategoryEntity.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
78 changes: 78 additions & 0 deletions
78
...ntsMicroservice.Database/Migrations/20231019201444_FixCaseSensitive_Key_CategoryEntity.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,78 @@ | ||
using System; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace EasyMicroservices.ContentsMicroservice.Migrations | ||
{ | ||
/// <inheritdoc /> | ||
public partial class FixCaseSensitive_Key_CategoryEntity : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.AlterColumn<string>( | ||
name: "Key", | ||
table: "Categories", | ||
type: "nvarchar(450)", | ||
nullable: true, | ||
collation: "SQL_Latin1_General_CP1_CS_AS", | ||
oldClrType: typeof(string), | ||
oldType: "nvarchar(max)", | ||
oldNullable: true); | ||
|
||
migrationBuilder.UpdateData( | ||
table: "Languages", | ||
keyColumn: "Id", | ||
keyValue: 1L, | ||
column: "CreationDateTime", | ||
value: new DateTime(2023, 10, 19, 23, 44, 44, 432, DateTimeKind.Local).AddTicks(6986)); | ||
|
||
migrationBuilder.UpdateData( | ||
table: "Languages", | ||
keyColumn: "Id", | ||
keyValue: 2L, | ||
column: "CreationDateTime", | ||
value: new DateTime(2023, 10, 19, 23, 44, 44, 432, DateTimeKind.Local).AddTicks(6999)); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Categories_Key", | ||
table: "Categories", | ||
column: "Key", | ||
unique: true, | ||
filter: "[Key] IS NOT NULL"); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropIndex( | ||
name: "IX_Categories_Key", | ||
table: "Categories"); | ||
|
||
migrationBuilder.AlterColumn<string>( | ||
name: "Key", | ||
table: "Categories", | ||
type: "nvarchar(max)", | ||
nullable: true, | ||
oldClrType: typeof(string), | ||
oldType: "nvarchar(450)", | ||
oldNullable: true, | ||
oldCollation: "SQL_Latin1_General_CP1_CS_AS"); | ||
|
||
migrationBuilder.UpdateData( | ||
table: "Languages", | ||
keyColumn: "Id", | ||
keyValue: 1L, | ||
column: "CreationDateTime", | ||
value: new DateTime(2023, 8, 31, 17, 37, 24, 623, DateTimeKind.Local).AddTicks(8580)); | ||
|
||
migrationBuilder.UpdateData( | ||
table: "Languages", | ||
keyColumn: "Id", | ||
keyValue: 2L, | ||
column: "CreationDateTime", | ||
value: new DateTime(2023, 8, 31, 17, 37, 24, 623, DateTimeKind.Local).AddTicks(8591)); | ||
} | ||
} | ||
} |
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