Forum Xamarin.Forms

Sqlite Rename Columns doesn't work on older iOS versions.

As part of a migration from an existing app on the App Store to Xamarin.Forms I rename columns in tables in the Core Data sqlite database. It works well using the syntax ALTER TABLE {tableName} RENAME {oldColumnName} TO {newColumnName}; when migrating on devices with iOS 13 and later. But with iOS 12 and earlier it throws the error near "{oldColumnName}": syntax error.

I tried using RENAME COLUMN instead of RENAME, using single and double quotes around the column names and modifying different tables and columns. And the column names don't use keywords.

Other commands work, just not the rename column command.

The sqlite version of the database file is 3.27.2. I am able to run this command successfully using DB Browser for SQLite.


Sign In or Register to comment.