Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct value type in hard-coded migrations test #33404

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}')");
Copy link
Member

@roji roji May 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fails on PostgreSQL because Table1 is unquoted :(

/cc @ajcvickers

}

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
Loading