Lines Matching refs:version
25 * A helper class to manage database creation and version management.
40 * monotonically increasing version numbers for upgrades.</p>
72 * @param version number of the database (starting at 1); if the database is older,
76 public SQLiteOpenHelper(Context context, String name, CursorFactory factory, int version) {
77 this(context, name, factory, version, null);
91 * @param version number of the database (starting at 1); if the database is older,
97 public SQLiteOpenHelper(Context context, String name, CursorFactory factory, int version,
99 if (version < 1) throw new IllegalArgumentException("Version must be >= 1, was " + version);
104 mNewVersion = version;
241 final int version = db.getVersion();
242 if (version != mNewVersion) {
244 throw new SQLiteException("Can't upgrade read-only database from version " +
250 if (version == 0) {
253 if (version > mNewVersion) {
254 onDowngrade(db, version, mNewVersion);
256 onUpgrade(db, version, mNewVersion);
324 * needs to upgrade to the new schema version.
338 * @param oldVersion The old database version.
339 * @param newVersion The new database version.
345 * {@link #onUpgrade} method, but is called whenever current version is newer than requested one.
356 * @param oldVersion The old database version.
357 * @param newVersion The new database version.
360 throw new SQLiteException("Can't downgrade database from version " +