SQL injection for raw query in Room migration class

Viewed 235

OWASP tool gives warning of sql injection while writing raw sql query in Room migration. Is there any solution to overcome for this problem. Below is my code:

class Migration1to2 : Migration(1, 2) {
override fun migrate(database: SupportSQLiteDatabase) {

    database.execSQL("ALTER TABLE Book ADD COLUMN pub_year INTEGER")
}
}
0 Answers
Related