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

Comments (on columns) that include line breaks are never created. #468

Closed
pmioduszewski opened this issue Aug 30, 2023 · 1 comment
Closed
Labels

Comments

@pmioduszewski
Copy link

Description
I already had some comments with line breaks in my existing postgresql db. I've used the dbmate dump command and moved output to the _init.sql migration file. After deleting the existing db and trying to recreate it from _init.sql using dbmate up, I've noticed that comments with line breaks were skipped without error.

  • Version: 2.6.0 (on Node 18)
  • Database: pg 13.7
  • Operating System: macOS 13.4.1 (c) (22F770820d) | Darwin 22.5.0 (M1)

Steps To Reproduce

  1. Example SQL in migrations that will never be applied:
COMMENT ON COLUMN my_schema.my_table.my_column IS '1-some comment before the line break
2-awesome comment in the new line
3-another comment
';
  1. This comment will NOT be created in the db. No errors are shown either.

Expected Behavior
Line breaks should be escaped inside comments.

I will be grateful for any workaround.

@pmioduszewski
Copy link
Author

Ok, for some reason, now it's working 🤷‍♂️ . I think that was the issue with DataGrip; after restarting, the comments appeared. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant