title: Undefined is not an object evaluating adapter.schema
body: <p>I am trying to integrate <code>WatermelonDb</code> in my React Native App.
  I am getting an error saying undefined is not an object(evaluating adapter.schema)</p>
  
  <p>I followed this GitHub issue 
  <a href="https://github.com/Nozbe/WatermelonDB/issues/40" rel="noreferrer">https://github.com/Nozbe/WatermelonDB/issues/40</a>
  but it didn't gave any solution</p>
  
  <p>I followed following steps for installation</p>
  
  <pre><code>yarn add @nozbe/watermelondb
  yarn add @nozbe/with-observables
  yarn add --dev @babel/plugin-proposal-decorators
  </code></pre>
  
  <p>I created a <code>.babelrc</code> file and added following </p>
  
  <pre><code>{
    "presets": ["module:metro-react-native-babel-preset"],
    "plugins": [
      ["@babel/plugin-proposal-decorators", { "legacy": true }]
    ]
  }
  </code></pre>
  
  <p>I opened my project in Xcode</p>
  
  <p>I created an empty <code>swift</code> file and when <code>Xcode</code> asked to create <code>Briding Header</code>, I created that as well</p>
  
  <p>Here is the screenshott</p>
  
  <p><a href="https://i.stack.imgur.com/KunZX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/KunZX.png" alt="enter image description here"></a></p>
  
  <p>I am using React Native 0.60 so I did not run the link command in the terminal.</p>
  
  <p>I also created a separate project where I tried running <code>react-native link @nozbe/watermelondb</code> in which <code>React Native</code> version is 0.60.5
  and when running the app on iOS simulator, react native throw a warning saying linking happens automatically so for unlinking I ran <code>react-native unlink @nozbe/watermelondb</code>  but I still face the same issue whether linked or not.</p>
  
  <p>Here is my sample code</p>
  
  <pre><code>import {appSchema, tableSchema} from '@nozbe/watermelondb';
  
  export const mySchema = appSchema({
    version: 1,
    tables: [
      tableSchema({
        name: 'users',
        columns: [
          {name: 'user_name', type: 'string'},
          {
            name: 'age',
            type: 'number',
            isOptional: true,
          },
          {name: 'is_male', type: 'boolean'},
        ],
      }),
    ],
  });
  
  import {Model} from '@nozbe/watermelondb';
  import {field} from '@nozbe/watermelondb/decorators';
  
  export default class Users extends Model {
    static table = 'users';
  
    @field('user_name') userName;
    @field('age') age;
    @field('is_male') isMale;
  }
  </code></pre>
  
  <p>In index.js</p>
  
  <pre><code>const database = new Database({
    modelClasses: [Users],
  });
  </code></pre>