-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Error converting psql DB to mariadb: QuoteHelper.php line 62: Only strings, Literals and Parameters are allowed #26085
Comments
@MorrisJobke I don't know who's the DB guy, but my best shot was you. :) I also noticed this during a conversion using NC 21. |
Nextcloud version (eg, 20.0.5): nextcloud:production (20.0.8) Same problem here the other way around: Migrating MariaDB to PostgreSQL. But the workaround did the job also. |
This issue affected me when attempting to convert the standard sqlite database to MySQL format. Nextcloud version: 21.0.0 Inserted the below into line 57 of
|
Same problem converting from sqlite to mysql on mariadb Nextcloud version (eg, 20.0.5): Solved by @maffblaster and @wivaku solution Please fix this issue as this is not uncommon |
Mind to share the complete stack trace? |
I don't have the logs any more |
@kesselb if it's still useful, this is the full stack trace I received with this same error. Edit: Converting from mariadb 10 --> pgsql 13
|
OP's workaround worked for me. Submitted pull request. |
Signed-off-by: Henry Jordan <hank@henryjordan.com>
Fix occ db:convert-type, issue nextcloud#26085
As maffblaster, this issue affected me when attempting to convert the standard sqlite database to mariadb 10.5. However different environment: Nextcloud version: 21.0.1 The inserted "if" on line 57 of QuoteHelper.php seems to fix the problem. |
addOrderBy expects a order expression. For the migration scenario we have column objects. Column objects are not supported by quoteColumnName yet. A column object as order expression is most likely an edgy thing when migration database information. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
addOrderBy expects a order expression. For the migration scenario we have column objects. Column objects are not supported by quoteColumnName yet. A column object as order expression is most likely an edgy thing when migration database information. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Nextcloud version (eg, 20.0.5):
21.0
Operating system and version (eg, Ubuntu 20.04):
MacOS Big Sur
Apache or nginx version (eg, Apache 2.4.25):
2.4.46
PHP version (eg, 7.4):
7.4.15
When I convert DB (in this case: from Postgresql to MariaDB) I get error message
In QuoteHelper.php line 62: Only strings, Literals and Parameters are allowed
Steps to replicate it:
php occ db:convert-type --clear-schema mysql <myuser> 127.0.0.1 <mydb>
Stack trace shows that instance of
Doctrine\DBAL\Schema\Column
is passed toquoteColumnName($string)
.As quick workaround I added to
QuoteHelper.php
(line 57):(first reported in community forum)
The text was updated successfully, but these errors were encountered: