title: Realm react native schema versioning
body: <p>I have the following 2 schemas in realm.js file</p>
  
  <pre><code>    class Bill extends Realm.Object {}
          Bill.schema = {
            name: 'Bill',
            primaryKey: 'id',
            properties: {
              id: { type: 'string', indexed: true },
              year: 'int',
              month: 'int',
              description: 'string',
              dateCreated: 'int',
          }
      };
  
      class User extends Realm.Object {}
          User.schema = {
            name: 'User',
            primaryKey: 'id',
            properties: {
              id: 'string',
              name: 'string?',
              email: 'string?'
            }
      };
  
   const realm = new Realm({schema: [Bill, User]}); 
  
   export default realm;
  </code></pre>
  
  <p>this works perfectly when I first release my app to AppStore or PlayStore. 
  I need to change both schema and release to AppStore or PlayStore again and I need to handle both new installation or update of my app where the schema change to following</p>
  
  <pre><code>    class Bill extends Realm.Object {}
          Bill.schema = {
            name: 'Bill',
            primaryKey: 'id',
            properties: {
              id: { type: 'string', indexed: true },
              year: 'int',
              month: 'int',
              description: 'string',
              dateCreated: 'int',
              dateDeleted: 'int',
          }
      };
  
      class User extends Realm.Object {}
          User.schema = {
            name: 'User',
            primaryKey: 'id',
            properties: {
              id: 'string',
              name: 'string?',
              email: 'string?',
              photoUrl: 'string?',
            }
      };
  </code></pre>
  
  <p>by adding one more field in each schema.</p>
  
  <p>So how should I configure my realm schema version?</p>
  
  <p>Should I configure like below:</p>
  
  <pre><code>const realm = new Realm([
                {schema: Bill, schemaVersion: 1}, 
                {schema: User, schemaVersion: 1}
              ]);
  </code></pre>
  
  <p>But this may crash for new installation.</p>