efcore.pg
efcore.pg copied to clipboard
SQL generated by DatabaseFacade.GenerateCreateScript() uses just LF for new schemas (instead of CRLF)
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.