Android.Database.Sqlite.SQLiteOpenHelper.OnDowngrade Method
Called when the database needs to be downgraded.

Syntax

[Android.Runtime.Register("onDowngrade", "(Landroid/database/sqlite/SQLiteDatabase;II)V", "GetOnDowngrade_Landroid_database_sqlite_SQLiteDatabase_IIHandler")]
public virtual void OnDowngrade (SQLiteDatabase db, int oldVersion, int newVersion)

Parameters

db
The database.
oldVersion
The old database version.
newVersion
The new database version.

Remarks

Called when the database needs to be downgraded. This is strictly similar to SQLiteOpenHelper.OnUpgrade(SQLiteDatabase, System.Int32, System.Int32) method, but is called whenever current version is newer than requested one. However, this method is not abstract, so it is not mandatory for a customer to implement it. If not overridden, default implementation will reject downgrade and throws SQLiteException

This method executes within a transaction. If an exception is thrown, all changes will automatically be rolled back.

[Android Documentation]

Requirements

Namespace: Android.Database.Sqlite
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 11