forked from mattconnolly/rails-backup-migrate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ce8c44e
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.
Backticks are valid syntax in MySQL which was my original use case. Is there a way you can detect Postgres and conditionally do this?
ce8c44e
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.
it was a quick solution for mattconnolly#15 ...
ce8c44e
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.
I see. I'm sorry that I didn't have better postgres support - it wasn't my use case when I started the project.
To move forward I would like to see both supported. I have seen use cases where the backticks are needed for MySQL. See if you can use this in there:
fixtures.keys.map { |k| ActiveRecord::Base.connection.quote_column_name(k) }…
ce8c44e
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.
... that way the column escaping is done by the rails driver which might work for everyone!
ce8c44e
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.
You're right, I hurried with pull request, before, when I was writing on a clean sql (mysql) and didn't use backtricks.. I think it's better to cancel this pull request
ce8c44e
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.
Is there a recommended solution here I can help contribute?