Skip to content

Fix for dash-named tables in PG SQL#187

Open
rubytech-avsorokin wants to merge 1 commit into
Baboo7:masterfrom
rubytech-avsorokin:patch-1
Open

Fix for dash-named tables in PG SQL#187
rubytech-avsorokin wants to merge 1 commit into
Baboo7:masterfrom
rubytech-avsorokin:patch-1

Conversation

@rubytech-avsorokin

Copy link
Copy Markdown

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

Escaping tablename in double quotes.

@binarybase

Copy link
Copy Markdown

+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