dotnet / dotnet/efcore

SQL truncated at lines starting with "go" in migrationBuilder.Sql

Open
#34,183 0 comments 0 reactions 0 assignees View on GitHub
area-migrations customer-reported
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

## File a bug
I can still reproduce #32457 in v8.0.6

Example script in `migrationBuilder.Sql`
```
SELECT
ColumnA,
ColumnB,
GoodColumn,
ColumnC
FROM
Table
```

Is truncated before executing to
```
SELECT
ColumnA,
ColumnB,
```
And fails with `Incorrect syntax near ','`

If I change to:
```
SELECT
ColumnA,
ColumnB,
[GoodColumn],
ColumnC
FROM
Table
```

It works. I presume it looks for lines starting with `go`?

### Include provider and version information

EF Core version: 8.0.6
Database provider: (e.g. Microsoft.EntityFrameworkCore.SqlServer)
Target framework: .NET 8
Operating system: Windows
IDE: Latest Visual Studio and Rider.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.