Now when deployment center is no longer available (?) how are we supposed to create empty SQL databases for new sites?
The command Update-EPiDatabase is used when upgrading versions via nuget, but is there a command for creating a new database from scratch?
My way of doing this might not be best practice but I sttill use Deployment Center, what wil happen when this is gone I have no idea, but for now it is working.
Install empty db from deployment center, 7.5
Run Update-EpiDatabase from within an empty project.
When installing a new project from VS you will also get an empty database but you will need to restore the files as a db in sql server.
Create new site in VS Extensions, don't choose to import Alloy stuff - instead, create an empty site. You may wondering what would I do with .mdf file under App_Data? Just attach as database in SQL Server - and you are all set.
I do like Valdis say. It works great.
And since we are repeating our self.. I was exactly what I said with the last sentence i my previous post ;)
Just a quick update on this one. As of 8.8 we have a new cmdlet "Initialize-EPiDatabase". This allows you to install a new EPiServer database into an empty database.
See more: http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-CMS/8/Deployment/About-the-database/
oh, that's nice.
Like others said
I sometimes start with the MDF-file from an empty Alloy db like Valdis said but typically download the database from the GitHub repo
Place it in App_Data and use the following connectionstring
<add name="EPiServerDB" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|Alloy.mdf;Initial Catalog=Alloy;Connection Timeout=60;Integrated Security=True;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
and run the Initialize-EPiDatabase command from the Package Manager Console
If you are missing the MDF-file simply create a new using Visual Studio, create a new item and select the SQL Server Database, when created run the Initialize-Epidatabase command
The actual SQL script with the CMS database schema is bundled in the EPiServer.CMS.Core package. You can find it in the package under /tools/EPiServer.CMS.Core.sql
So you can e.g. create a new empty database in SQL Managment studio and execute the script on the database.
Another options is to set atttribute 'createDatabaseSchema=true' on the episerver.framework element in web.config (it will not create the actual database but will install the schema if the connection string points to an database without the cms schema)