efcore.pg icon indicating copy to clipboard operation
efcore.pg copied to clipboard

SQL generated by DatabaseFacade.GenerateCreateScript() uses just LF for new schemas (instead of CRLF)

Open springy76 opened this issue 3 years ago • 0 comments

I'm executing dbContext.Database.GenerateCreateScript() and saving the result to a file (for git-commit and therefore dev-review of changes).

While the file having thousands of lines all using CRLF there are 2 (per user created schema) which just use LF, triggering a VS repair dialog each time you open such file.

The generated problem code looks like that (6 lines):

DO $EF$
BEGIN
    IF NOT EXISTS(SELECT 1 FROM pg_namespace WHERE nspname = 'AspNetCoreIdentity') THEN
        CREATE SCHEMA "AspNetCoreIdentity";
    END IF;
END $EF$;

Only line #3 (ending with THEN) and #4 (ending with entity";) use LF, all others use CRLF.

springy76 avatar Sep 23 '22 08:09 springy76