title: How to get automigrate to work with SQL Server
body: <p>I can't get automigrate and autoupdate to work.</p>
  
  <p>I created my project, datasource and model. All looks good, but I can't get automigrate to work. If I go to my SQL Server and create the table/schema then all the GET/POST methods work fine.</p>
  
  <p>I went to the server/boot directory. there are currently two files in there authentication and root.</p>
  
  <p>I created a new file called automigrate.js</p>
  
  <pre><code>'use strict';
  
   module.exports = function (app) {
     app.dataSources.mysql.automigrate();
     console.log("Performed automigration.");
  }
  </code></pre>
  
  <p>When I run it I get an error :</p>
  
  <blockquote>
    <p>C:\Users\ajmal\loopback\telematics\server\server.js:31 if (err) throw err; ^</p>
    
    <p>TypeError: Cannot read property 'automigrate' of undefined    </p>
    
    <p>at Object.module.exports [as func] (C:\Users\ajmal\loopback\telematics\server\boot\automigrate.js:9:26)<br>
    at C:\Users\ajmal\loopback\telematics\node_modules\loopback-boot\lib\executor.js:316:22</p>
  </blockquote>