Skip to content

Commit

Permalink
Correct value type in hard-coded migrations test (#33404)
Browse files Browse the repository at this point in the history
Column is created as int, but then used as string. Causing issues for Pomelo MySQL provider.

Fixes #33331
  • Loading branch information
ajcvickers authored Mar 26, 2024
1 parent 62a8b12 commit 92e6124
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ Empty Lines

protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql($"INSERT INTO Table1 (Id, Bar, Description) VALUES (-1, ' ', '{TestValue}')");
migrationBuilder.Sql($"INSERT INTO Table1 (Id, Bar, Description) VALUES (-1, 3, '{TestValue}')");
}

protected override void Down(MigrationBuilder migrationBuilder)
Expand All @@ -508,7 +508,7 @@ Empty Lines

protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql($"INSERT INTO Table1 (Id, Bar, Description) VALUES (-2, ' ', '{TestValue}')");
migrationBuilder.Sql($"INSERT INTO Table1 (Id, Bar, Description) VALUES (-2, 4, '{TestValue}')");
}

protected override void Down(MigrationBuilder migrationBuilder)
Expand All @@ -533,7 +533,7 @@ Empty Lines

protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql($"INSERT INTO Table1 (Id, Bar, Description) VALUES (-3, ' ', '{TestValue}')");
migrationBuilder.Sql($"INSERT INTO Table1 (Id, Bar, Description) VALUES (-3, 5, '{TestValue}')");
}

protected override void Down(MigrationBuilder migrationBuilder)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ INSERT INTO [__EFMigrationsHistory] ([MigrationId], [ProductVersion])
BEGIN TRANSACTION;
GO

INSERT INTO Table1 (Id, Bar, Description) VALUES (-1, ' ', 'Value With
INSERT INTO Table1 (Id, Bar, Description) VALUES (-1, 3, 'Value With

Empty Lines')
GO
Expand All @@ -178,7 +178,7 @@ INSERT INTO [__EFMigrationsHistory] ([MigrationId], [ProductVersion])
BEGIN TRANSACTION;
GO

INSERT INTO Table1 (Id, Bar, Description) VALUES (-2, ' ', 'GO
INSERT INTO Table1 (Id, Bar, Description) VALUES (-2, 4, 'GO
Value With

Empty Lines')
Expand All @@ -194,7 +194,7 @@ INSERT INTO [__EFMigrationsHistory] ([MigrationId], [ProductVersion])
BEGIN TRANSACTION;
GO

INSERT INTO Table1 (Id, Bar, Description) VALUES (-3, ' ', 'GO
INSERT INTO Table1 (Id, Bar, Description) VALUES (-3, 5, 'GO
Value With

GO
Expand Down Expand Up @@ -288,7 +288,7 @@ INSERT INTO [__EFMigrationsHistory] ([MigrationId], [ProductVersion])
VALUES (N'00000000000004_Migration4', N'7.0.0-test');
GO

INSERT INTO Table1 (Id, Bar, Description) VALUES (-1, ' ', 'Value With
INSERT INTO Table1 (Id, Bar, Description) VALUES (-1, 3, 'Value With

Empty Lines')
GO
Expand All @@ -297,7 +297,7 @@ INSERT INTO [__EFMigrationsHistory] ([MigrationId], [ProductVersion])
VALUES (N'00000000000005_Migration5', N'7.0.0-test');
GO

INSERT INTO Table1 (Id, Bar, Description) VALUES (-2, ' ', 'GO
INSERT INTO Table1 (Id, Bar, Description) VALUES (-2, 4, 'GO
Value With

Empty Lines')
Expand All @@ -307,7 +307,7 @@ INSERT INTO [__EFMigrationsHistory] ([MigrationId], [ProductVersion])
VALUES (N'00000000000006_Migration6', N'7.0.0-test');
GO

INSERT INTO Table1 (Id, Bar, Description) VALUES (-3, ' ', 'GO
INSERT INTO Table1 (Id, Bar, Description) VALUES (-3, 5, 'GO
Value With

GO
Expand Down Expand Up @@ -534,7 +534,7 @@ IF NOT EXISTS (
WHERE [MigrationId] = N'00000000000005_Migration5'
)
BEGIN
INSERT INTO Table1 (Id, Bar, Description) VALUES (-1, ' ', 'Value With
INSERT INTO Table1 (Id, Bar, Description) VALUES (-1, 3, 'Value With

Empty Lines')
END;
Expand All @@ -561,7 +561,7 @@ IF NOT EXISTS (
WHERE [MigrationId] = N'00000000000006_Migration6'
)
BEGIN
INSERT INTO Table1 (Id, Bar, Description) VALUES (-2, ' ', 'GO
INSERT INTO Table1 (Id, Bar, Description) VALUES (-2, 4, 'GO
Value With

Empty Lines')
Expand Down Expand Up @@ -589,7 +589,7 @@ IF NOT EXISTS (
WHERE [MigrationId] = N'00000000000007_Migration7'
)
BEGIN
INSERT INTO Table1 (Id, Bar, Description) VALUES (-3, ' ', 'GO
INSERT INTO Table1 (Id, Bar, Description) VALUES (-3, 5, 'GO
Value With

END;
Expand Down Expand Up @@ -755,7 +755,7 @@ IF NOT EXISTS (
WHERE [MigrationId] = N'00000000000005_Migration5'
)
BEGIN
INSERT INTO Table1 (Id, Bar, Description) VALUES (-1, ' ', 'Value With
INSERT INTO Table1 (Id, Bar, Description) VALUES (-1, 3, 'Value With

Empty Lines')
END;
Expand All @@ -776,7 +776,7 @@ IF NOT EXISTS (
WHERE [MigrationId] = N'00000000000006_Migration6'
)
BEGIN
INSERT INTO Table1 (Id, Bar, Description) VALUES (-2, ' ', 'GO
INSERT INTO Table1 (Id, Bar, Description) VALUES (-2, 4, 'GO
Value With

Empty Lines')
Expand All @@ -798,7 +798,7 @@ IF NOT EXISTS (
WHERE [MigrationId] = N'00000000000007_Migration7'
)
BEGIN
INSERT INTO Table1 (Id, Bar, Description) VALUES (-3, ' ', 'GO
INSERT INTO Table1 (Id, Bar, Description) VALUES (-3, 5, 'GO
Value With

END;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public override void Can_generate_up_scripts()

BEGIN TRANSACTION;

INSERT INTO Table1 (Id, Bar, Description) VALUES (-1, ' ', 'Value With
INSERT INTO Table1 (Id, Bar, Description) VALUES (-1, 3, 'Value With

Empty Lines')

Expand All @@ -106,7 +106,7 @@ INSERT INTO Table1 (Id, Bar, Description) VALUES (-1, ' ', 'Value With

BEGIN TRANSACTION;

INSERT INTO Table1 (Id, Bar, Description) VALUES (-2, ' ', 'GO
INSERT INTO Table1 (Id, Bar, Description) VALUES (-2, 4, 'GO
Value With

Empty Lines')
Expand All @@ -118,7 +118,7 @@ Value With

BEGIN TRANSACTION;

INSERT INTO Table1 (Id, Bar, Description) VALUES (-3, ' ', 'GO
INSERT INTO Table1 (Id, Bar, Description) VALUES (-3, 5, 'GO
Value With

GO
Expand Down Expand Up @@ -168,22 +168,22 @@ public override void Can_generate_up_scripts_noTransactions()
INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('00000000000004_Migration4', '7.0.0-test');

INSERT INTO Table1 (Id, Bar, Description) VALUES (-1, ' ', 'Value With
INSERT INTO Table1 (Id, Bar, Description) VALUES (-1, 3, 'Value With

Empty Lines')

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('00000000000005_Migration5', '7.0.0-test');

INSERT INTO Table1 (Id, Bar, Description) VALUES (-2, ' ', 'GO
INSERT INTO Table1 (Id, Bar, Description) VALUES (-2, 4, 'GO
Value With

Empty Lines')

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('00000000000006_Migration6', '7.0.0-test');

INSERT INTO Table1 (Id, Bar, Description) VALUES (-3, ' ', 'GO
INSERT INTO Table1 (Id, Bar, Description) VALUES (-3, 5, 'GO
Value With

GO
Expand Down

0 comments on commit 92e6124

Please sign in to comment.