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 for dash-named tables in PG SQL #187

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rubytech-avsorokin
Copy link

Bugfix Import failed when collection name contains dash in it's name.

Escaping tablename in double quotes.

@binarybase
Copy link

+1

I also faced this issue, I've fixed it with double quotes like you

otherwise triggers syntax error

strapiDB  | 2024-06-05 19:33:11.441 UTC [74] ERROR:  syntax error at or near "-" at character 104
strapiDB  | 2024-06-05 19:33:11.441 UTC [74] STATEMENT:  SELECT SETVAL((SELECT PG_GET_SERIAL_SEQUENCE('ctype-grouping_group', 'id')), (SELECT MAX(id) FROM ctype-grouping_group) + 1, FALSE);
strapi    | [2024-06-05 19:33:11.443] error: SELECT SETVAL((SELECT PG_GET_SERIAL_SEQUENCE('ctype-grouping_group', 'id')), (SELECT MAX(id) FROM ctype-grouping_group) + 1, FALSE); - syntax error at or near "-"

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.

2 participants