title: moving to a new database with Code First Migrations
body: <p>I have recently started using code first and migrations and I'm pretty happy with it.. I have been following the constant pattern of add-migration and update-database!</p>
  
  <p>I have just tried to move from localdb to SQL Express and im having a real pain..</p>
  
  <p>when I try and run the application.. I get the follow error..</p>
  
  <blockquote>
    <p>Cannot find the object "dbo.AspNetUsers" because it does not exist or you do not have permissions.</p>
  </blockquote>
  
  <p>In my Global file I have..</p>
  
  <blockquote>
    <p>Database.SetInitializer(new MigrateDatabaseToLatestVersion());</p>
  </blockquote>
  
  <p>Any ideas? It looks like the core forms tables are not being created?</p>
  
  <p>if I run my application without the Initializer in the global file I get this.</p>
  
  <blockquote>
    <p>Migrations is enabled for context 'ApplicationDbContext' but the database does not exist or contains no mapped tables. Use Migrations to create the database and its tables, for example by running the 'Update-Database' command from the Package Manager Console.</p>
  </blockquote>
  
  <p>Thanks
  Ste.</p>