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

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

Closed
springy76 opened this issue Sep 23, 2022 · 3 comments · Fixed by #2513
Assignees
Labels
bug Something isn't working
Milestone

Comments

@springy76
Copy link

springy76 commented Sep 23, 2022

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 line3 (ending with THEN) and line4 (ending with entity";) use LF, all others use CRLF.

@roji roji self-assigned this Sep 24, 2022
@roji roji added the bug Something isn't working label Sep 24, 2022
@roji roji added this to the 7.0.0 milestone Sep 24, 2022
roji added a commit to roji/efcore.pg that referenced this issue Sep 24, 2022
@roji roji modified the milestones: 7.0.0, 6.0.8 Sep 24, 2022
roji added a commit that referenced this issue Sep 24, 2022
@roji
Copy link
Member

roji commented Sep 24, 2022

@springy76 thanks, fixed this for 6.0.8.

@springy76
Copy link
Author

springy76 commented Jan 12, 2024

similar problem now with 8.0.0 but now just LF on:

  • the empty line between 2 blocks
  • L1 (DO $EF$)
  • L2 (BEGIN)
  • L5 (END IF;)

L6 (END $EF$;) though uses CRLF as expected

I guess problem source is git related, again.

@springy76
Copy link
Author

@roji do get comments on closed issues get seen at all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants