You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was tasked with getting an older cordova app to work. It used cordova-sqlite-ext 2.3.0 and worked up until Android 11. After that the DB did not start due to:
java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String io.liteglue.SQLDatabaseHandle.getLastErrorMessage()' on a null object reference
I decided to do that and updated to the latest cordova-sqlite-ext version, 6.0.0 and the DB started to work on Android 12 devices. (it seems that any version >= 4.0.0 works).
However, this broke compatibility with Android 8 devices. On those a previously working query:
ALTER TABLE "<name of the table>" RENAME COLUMN <name of the column> TO <new name>;
now fails with a SQLiteException:
(near "COLUMN": syntax error (code 1): , while compiling: ALTER TABLE "<name of the table>" RENAME COLUMN <name of the column> TO <new name>;)
I have not touched this query and it definitely worked fine before updating. The only thing I could find about this up to now was that maybe the RENAME keyword is not supported? Which does not really make sense since it used to work?
The text was updated successfully, but these errors were encountered:
I also managed to recreate the error on a Samsung Galaxy S8 with Android 9.0 and a Samsung Galaxy S9 with Android 10.0.
A Samsung Galaxy S20 with Android 11.0 worked fine.
CRTCTY
changed the title
Query with RENAME breaks on Android 8, but only with new versions
Query with RENAME breaks on Android 8, 9 and 10, but only with new versions
Aug 26, 2022
I was tasked with getting an older cordova app to work. It used cordova-sqlite-ext 2.3.0 and worked up until Android 11. After that the DB did not start due to:
java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String io.liteglue.SQLDatabaseHandle.getLastErrorMessage()' on a null object reference
A similar issue exists in the cordova-sqlite-storage repo, it is storesafe/cordova-sqlite-storage#995 and can apparently be solved by updating to a newer version.
I decided to do that and updated to the latest cordova-sqlite-ext version, 6.0.0 and the DB started to work on Android 12 devices. (it seems that any version >= 4.0.0 works).
However, this broke compatibility with Android 8 devices. On those a previously working query:
ALTER TABLE "<name of the table>" RENAME COLUMN <name of the column> TO <new name>;
now fails with a SQLiteException:
(near "COLUMN": syntax error (code 1): , while compiling: ALTER TABLE "<name of the table>" RENAME COLUMN <name of the column> TO <new name>;)
I have not touched this query and it definitely worked fine before updating. The only thing I could find about this up to now was that maybe the RENAME keyword is not supported? Which does not really make sense since it used to work?
The text was updated successfully, but these errors were encountered: