I was trying to run migration while renaming a column in room database. My code is following
public static final Migration MIGRATION_11_12 = new Migration(11, 12) {
@Override
public void migrate(SupportSQLiteDatabase database) {
database.execSQL("ALTER TABLE content RENAME COLUMN archiveCount TO dismissCount");
}
};
Besides android studio is detecting the following error
Although, it was compiling without any problem .
And I am getting the following error in the above code , while running migration test
android.database.sqlite.SQLiteException: near "COLUMN": syntax error (code 1)