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

Further clarification to custom expressions in index #618

Merged

Conversation

emadshaaban92
Copy link
Contributor

Fixes #617

@emadshaaban92 emadshaaban92 force-pushed the fix-index-column-reserved branch from bc458e6 to 0414fb9 Compare June 19, 2024 14:31
@emadshaaban92 emadshaaban92 changed the title Quote string index column name when it isn't an expression Further clarification to custom expressions in index Jun 19, 2024
lib/ecto/migration.ex Outdated Show resolved Hide resolved
Comment on lines +924 to +925
If the expression is a column name, it will not be quoted. This may cause issues
when the column is named after a reserved word. Consider using an atom instead.
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps add a quick example below for the offset problem that was stumbled on?

@greg-rychlewski greg-rychlewski merged commit a20f2d3 into elixir-ecto:master Jun 19, 2024
10 checks passed
@greg-rychlewski
Copy link
Member

thank you!

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.

Creating index on a column named as a reserved word
4 participants