-
Notifications
You must be signed in to change notification settings - Fork 66
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
base: master
Are you sure you want to change the base?
Conversation
5787dcd
to
17a32d4
Compare
Thanks for doing this @pauldraper. We use migra and we also use comments, so this gets a 👍 from me! |
This will break if the comment has a single quote in it. Is there a way the string can be escaped when templating? |
@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( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return "comment on {} {} is '{}';".format( | |
return "comment on {} {} is $cmt${}$cmt$;".format( |
Might be worth using dollar quoting to allow unescaped '
in the comment
13f62b5
to
ebbc2e4
Compare
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? |
Similar to #14 but with tests