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

fix: double quoted string literals in migrator #183

Merged
merged 1 commit into from Mar 9, 2024

Conversation

ncruces
Copy link
Contributor

@ncruces ncruces commented Feb 10, 2024

  • Do only one thing
  • Non breaking API changes
  • Tested

What did this pull request do?

Using %q is not appropriate to quote a string literal in RAW SQL. Double-quoted strings are considered a misfeature of SQLite, and advised to be disabled at compile time. Also, %q produces the wrong quoting: Hi "GORM"! is quoted as "Hi \"GORM\"!" not "Hi ""GORM""!", as SQLite would expect.

Current head fails GORM TestMigrateWithUniqueIndexAndUnique if SQLite is configured with SQLITE_DQS=0.

User Case Description

@jinzhu jinzhu merged commit 00ab012 into go-gorm:master Mar 9, 2024
3 of 4 checks passed
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.

None yet

2 participants