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

Implement comments #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pauldraper
Copy link

Similar to #14 but with tests

@roblevy
Copy link

roblevy commented Feb 8, 2021

Thanks for doing this @pauldraper. We use migra and we also use comments, so this gets a 👍 from me!

@amerryma
Copy link

This will break if the comment has a single quote in it. Is there a way the string can be escaped when templating?

@jvandermey
Copy link

@pauldraper @djrobstep , it'd be great to have this and djrobstep/migra#45 in master. Anything I can do to help get them across the finish line?


@property
def create_statement(self):
return "comment on {} {} is '{}';".format(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return "comment on {} {} is '{}';".format(
return "comment on {} {} is $cmt${}$cmt$;".format(

Might be worth using dollar quoting to allow unescaped ' in the comment

@ruoqianwu
Copy link

Thanks for creating this PR. We are very interested in having this feature in migra so that we can use it with Hasura which makes great use of comments against the database schema. Is there anything we can help to get this PR across the finish line?

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

Successfully merging this pull request may close these issues.

6 participants