// Path: app/src/main/java/kesshou/android/daanx/models/Migration.java
// public class Migration implements RealmMigration {
// 	@Override
// 	public void migrate(final DynamicRealm realm, long oldVersion, long newVersion) {
// 		// During a migration, a DynamicRealm is exposed. A DynamicRealm is an untyped variant of a normal Realm, but
// 		// with the same object creation and query capabilities.
// 		// A DynamicRealm uses Strings instead of Class references because the Classes might not even exist or have been
// 		// renamed.
// 
// 		// Access the Realm schema in order to create, modify or delete classes and their fields.
// 		RealmSchema schema = realm.getSchema();
// 
// 		if(oldVersion==1){
// 
// 			RealmObjectSchema settingSchema = schema.get("Setting");
// 
// 			settingSchema.addField("locale",String.class)
// 					.transform(new RealmObjectSchema.Function() {
// 						@Override
// 						public void apply(DynamicRealmObject obj) {
// 							obj.set("locale","Auto");
// 						}
// 					});
// 
// 			oldVersion++;
// 		}
// 
// 		if(oldVersion==2){
// 
// 			RealmObjectSchema cacheSchema = schema.get("NetWorkCache");
// 
// 			cacheSchema.removeField("record").addField("record",String.class);
// 
// 			oldVersion++;
// 		}
// 	}
// }


import android.app.Application;
import io.realm.Realm;
import io.realm.RealmConfiguration;
import kesshou.android.daanx.models.Migration;
package kesshou.android.daanx;



/**
 * Created by yoyoIU on 2016/9/17.
 */
public class MyApplication extends Application {

	@Override
	public void onCreate(){
		super.onCreate();

		Realm.init(getApplicationContext());

		RealmConfiguration realmConfiguration = new RealmConfiguration.Builder()
			.name("default.realm")
			.schemaVersion(3)
// Path: app/src/main/java/kesshou/android/daanx/models/Migration.java
// public class Migration implements RealmMigration {
// 	@Override
// 	public void migrate(final DynamicRealm realm, long oldVersion, long newVersion) {
// 		// During a migration, a DynamicRealm is exposed. A DynamicRealm is an untyped variant of a normal Realm, but
// 		// with the same object creation and query capabilities.
// 		// A DynamicRealm uses Strings instead of Class references because the Classes might not even exist or have been
// 		// renamed.
// 
// 		// Access the Realm schema in order to create, modify or delete classes and their fields.
// 		RealmSchema schema = realm.getSchema();
// 
// 		if(oldVersion==1){
// 
// 			RealmObjectSchema settingSchema = schema.get("Setting");
// 
// 			settingSchema.addField("locale",String.class)
// 					.transform(new RealmObjectSchema.Function() {
// 						@Override
// 						public void apply(DynamicRealmObject obj) {
// 							obj.set("locale","Auto");
// 						}
// 					});
// 
// 			oldVersion++;
// 		}
// 
// 		if(oldVersion==2){
// 
// 			RealmObjectSchema cacheSchema = schema.get("NetWorkCache");
// 
// 			cacheSchema.removeField("record").addField("record",String.class);
// 
// 			oldVersion++;
// 		}
// 	}
// }


// Path: app/src/main/java/kesshou/android/daanx/MyApplication.java
import android.app.Application;
import io.realm.Realm;
import io.realm.RealmConfiguration;
import kesshou.android.daanx.models.Migration;

package kesshou.android.daanx;



/**
 * Created by yoyoIU on 2016/9/17.
 */
public class MyApplication extends Application {

	@Override
	public void onCreate(){
		super.onCreate();

		Realm.init(getApplicationContext());

		RealmConfiguration realmConfiguration = new RealmConfiguration.Builder()
			.name("default.realm")
			.schemaVersion(3)
			.migration(new Migration())