You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
createSchema doesn't escape the schema name #15651
See issue #4202. The problem still exists. I'd like to create a PostgreSQL schema with a hyphen (let's say "my-application"), but this results in the following error:
syntax error at or near \"-\"
Reproducible Example
import { Sequelize } from 'sequelize'
const db = new Sequelize(process.env.POSTGRESQL_URL)
await db.authenticate()
await db.createSchema('my-application', {})
No, I don't have the time, and I understand that I will need to wait until someone from the community or maintainers is interested in resolving my issue.
Indicate your interest in the resolution of this issue by adding the 👍 reaction. Comments such as "+1" will be removed.
Awesome! I was unable to find the relevant changelog entry from v7, could you point me in the right direction? Then I could attempt a PR with the backport.
Awesome! I was unable to find the relevant changelog entry from v7, could you point me in the right direction? Then I could attempt a PR with the backport.
I assume it was part of the various fixes done in #14999
Activity
ephys commentedon Feb 6, 2023
This has been fixed in Sequelize 7, the fix can be backported to v6
meyfa commentedon Feb 8, 2023
Awesome! I was unable to find the relevant changelog entry from v7, could you point me in the right direction? Then I could attempt a PR with the backport.
rushilmehra commentedon Feb 18, 2023
I’d like to pick this up
WikiRik commentedon Feb 22, 2023
I assume it was part of the various fixes done in #14999
ephys commentedon Feb 22, 2023
You're right, it's here: https://github.com/sequelize/sequelize/pull/14999/files#diff-d6c44e5861b8b76b4562220dbed9b2043de963db1178b62507aaee6bc0dfdfdbR71
meyfa commentedon Mar 9, 2023
@rushilmehra I see you were assigned, but since it seems like you haven't yet made a PR, I went ahead and opened #15752 myself - I hope that's okay.
fix(postgres): escape identifier in createSchema and dropSchema (#15752)
github-actions commentedon Mar 9, 2023
🎉 This issue has been resolved in version 6.29.2 🎉
The release is available on:
Your semantic-release bot 📦🚀