title: Visual Studio 2013 database project - deployment / publishing - filegroup PRIMARY
body: <p>Traditionally I have created simple databases using SQL Server Management Studio, then taken a backup and restored to an empty database online. That is the preferred way of my hosting server. </p>
  
  <p>I recently started using Visual Studio 2013 database project options because I prefer that environment. I used this <a href="http://sanderstechnology.com/2013/schema-modelling-with-visual-studio-2013-preview/12336/#.VijncNKFO71" rel="nofollow">http://sanderstechnology.com/2013/schema-modelling-with-visual-studio-2013-preview/12336/#.VijncNKFO71</a> as my guide. </p>
  
  <p>There are differences - I don't have the post deploy scripts option so I have created databases using PUBLISH which seems to be fine. There is one quirk which differs in all the examples I've looked at. When I publish, it creates the database with the name I chose and appends <code>_PRIMARY</code>. In the database properties it shows the database name but above that it shows <code>FileGroup = Primary</code>, so I'm assuming that is why? When I view the DB via VS2013 or SQL Server Management Studio, it just shows the DB name but if I want to attach the DB to a project I have to attach the <code>_PRIMARY.mdf</code> file. </p>
  
  <p>In my ignorance I am assuming the <code>_PRIMARY</code> is a wrapper around the database? I am wondering why VS2013 does that and if deploying the way I do, as explained above, is this going to cause issues? Or am I simply doing everything wrong..</p>