-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
SQLite column comment generates invalid alter query #5934
Comments
4 tasks
You are running an outdated version if DBAL. If this still happens on the current release, do you want to work in a PR to fix it? |
I can confirm that this still is an issue with DBAL 3.6 (and also with 4.0 preview).
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
Summary
Nextcloud got a report that column comments on sqlite leads to an sql error like:
General error: 1 incomplete input
12The code to add the column.
It works to run all migrations on a clean database.
It breaks when the migration with the column comment is executed alone.
The generated alter table query is:
Comments with
--
are not supported (or broken) according to: https://sqlite.org/forum/forumpost/4bb7806a96e863f0A possible solution could be to drop comments for alter table statments on sqlite.
Migrating from -- to /* */ should also work, but it seems complicated to make dbal work with the sql style comments and c style comments.
Current behaviour
The generated sql query results in an error
How to reproduce
Expected behaviour
No sql error ;)
Footnotes
https://github.com/nextcloud/server/pull/36803 ↩
https://github.com/nextcloud/forms/pull/1479#issuecomment-1439234202 ↩
The text was updated successfully, but these errors were encountered: