Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

What's simplest/best way to script a new empty episerver commerce database on any server?

Vote:
 

Hi,

As the subject says, I want to easily create an empty commerce database on a sql server. Is there any sql-files I can run in the packages folder, a powershell command in the packages folder or anything?

Thanks!

#205113
Jun 28, 2019 15:02
Vote:
 

Hey Andreas

In your \packages\EPiServer.Commerce.Core.13.3.1\tools folder (where 13.3.1 is your version of Commerce) there is a SQL script that allows you to install a fresh DB. 

This describes how the process works for CMS too: https://world.episerver.com/documentation/Items/Developers-Guide/Episerver-CMS/9/Deployment/installing-database-schema/

David

#205119
Jun 28, 2019 15:52
Vote:
 

Thanks, a follow up question. Now when i have an empty commerce db and "pure" CMS db. If I run update-epidatabse to my commerce manager project in visual studio the following sql-scripts are processed

Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\7.8.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\7.10.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\7.11.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\7.12.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\7.13.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\7.14.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\7.16.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\7.19.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\7.19.1.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\8.0.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\8.4.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\8.6.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\8.7.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\8.9.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\8.10.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\9.0.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\9.0.1.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\9.0.2.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\9.1.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\9.1.1.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\9.2.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\9.3.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\9.4.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\9.5.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\9.6.2.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\9.7.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\9.8.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\9.8.1.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\9.8.2.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\9.8.3.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\10.0.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\10.1.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\10.2.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\10.3.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\10.3.2.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\10.4.1.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\10.5.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\10.6.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\10.7.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\10.8.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\10.9.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\10.10.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\11.0.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\11.2.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\11.3.3.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\11.3.4.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\11.5.4.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\11.6.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\11.7.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\11.8.1.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\11.10.0.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\11.10.7.sql
Processing \packages\EPiServer.CMS.Core.11.12.0\tools\epiupdates\sql\11.12.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_CMS\sql\7.6.0.1.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_CMS\sql\8.0.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_CMS\sql\8.0.1.2.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_CMS\sql\9.0.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\5.1.0.1.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\5.1.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\5.1.2.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\5.2.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\5.2.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\5.3.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\5.4.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\5.5.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\5.5.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\5.5.2.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\5.6.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\5.6.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.0.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.0.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.0.2.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.1.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.1.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.2.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.3.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.3.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.3.2.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.4.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.4.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.4.2.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.4.3.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.5.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.6.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.7.0.1.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.7.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.8.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.9.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.9.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.9.2.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.9.3.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.10.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.10.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.10.2.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.10.3.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.10.4.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.10.5.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\6.10.6.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.0.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.0.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.0.2.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.0.3.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.0.4.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.0.5.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.0.6.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.0.7.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.0.8.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.0.9.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.0.10.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.0.11.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.0.12.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.0.13.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.0.14.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.0.15.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.0.16.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.1.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.1.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.2.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.2.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.2.2.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.3.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.3.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.4.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.4.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.4.2.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.4.3.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.4.4.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.4.5.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.4.6.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.4.7.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.4.8.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.4.9.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.5.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.5.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.5.2.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.5.3.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.5.4.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.5.5.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.5.6.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.5.7.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.5.8.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.5.9.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.6.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.6.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.6.2.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.6.3.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.6.4.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.7.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.8.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.9.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.10.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\7.10.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\8.0.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\8.0.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\8.0.2.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\8.0.3.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\8.0.4.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\8.0.5.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\8.0.6.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\8.0.7.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\8.0.8.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\8.0.9.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\8.0.10.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\8.0.11.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\8.0.12.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\8.1.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\8.1.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\8.1.2.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\8.1.3.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\8.1.4.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\8.1.5.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\9.0.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\9.0.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\9.0.2.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\9.0.3.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\9.0.4.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\9.1.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\9.1.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\9.1.2.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\9.1.3.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\9.1.4.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\9.1.5.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\9.1.6.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\9.1.7.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\9.1.8.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\10.0.0.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\10.0.1.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\10.0.2.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\10.0.3.0.sql
Processing \packages\EPiServer.Commerce.Core.13.3.1\tools\epiupdates_commerce\sql\10.0.4.0.sql

Does that mean that I can't only update the commerce db but need to update the CMS db as well? How would I go on now to make both the CMS and commerce db be configured correctly and up to date (I have <episerver.framework updateDatabaseSchema="true" createDatabaseSchema="true"> set in both cms and commerce manager web.configs but I see the this is not applicable to commerce right now).

Also, what's happening in the background when I do update-epidatabase, what powershell function is triggered and can I run that command on the server to accomplish some kind of automation?

#205125
Jun 28, 2019 16:40
Andreas Johansson - Jun 28, 2019 16:45
Is it this section that is the magic part?

Applying transforms to a production environment
The recommended approach is that you re-deploy the whole site with updated files (including configuration files). Use configSource to split configuration into multiple files to avoid overwriting production-specific configuration when deploying new changes.

If automatic schema updates are enabled in the production environment, then the production database schema is upgraded when new assembly versions are deployed to production site. When automatic schema updates are not enabled, then database schema changes can be deployed using the following steps:

Open Package Manager Console.
Make sure "Default project" points to the website.
Write Export-EPiUpdates and press Enter.
Copy the exported files to the production machine (the path to the exported files should be obvious from the log messages).
On the production machine: Open a command prompt as Administrators and execute update.bat c:\inetpub\mysite. The update.bat is just a simple readable batch file that executes the different transforms on a specific site. By default, only SQL transformations are executed, see note below.
Vote:
 

The upgrade scripts have checks to make sure that you won't run a script twice, so you don't have to worry about it. Now you can run update-epidatabase again and the result would still be the same. Just a small note : You should have run update-epidatabase in the context of your "cms" site, not commerce manager.

Regarding createDatabaseSchema, we tried with Commerce database but gave up because it was too complicated for its own good. 

#205141
Jun 29, 2019 7:20
Andreas Johansson - Jun 29, 2019 9:56
Hi and thanks for the answer and clarification from both you and David Knipe. (Please add in your documentation that update-epidatabase should always be run from the front-end site, I might have missed that a couple of times :) )

Now I have several follow up questions based on "createDatabaseSchema". (I'm new to Commerce so these might be questions might be obvious, sorry in that case)
1. Do I understand correctly that I can always do "Export-EPiUpdates" and run the batch-file on the target server/database and that should always be enough for an upgrade (besides updating the code of course).
2. I hate manual work when building/deploying since it's time consuming, error prone and boring (I rather use my time to improve, develop etc. Also I think clients rather pay for improving their site instead of human deployment interactions). For an only CMS site it's easy to automate the build/deploy process and that's how I think it should be since many years back. Please explain how you would automate the deployment of an cms + commerce site (should I somehow invoke the "Export-EPiUpdates" in the build job, save the output as an artifact and deploy the generated scripts together with the CMS/commerce site; and after the deployment is done, invoke the batch script?)
3. Do you have any other plan in on how to automate the upgrade parts?

Thanks for taking your time, I really appriciate you taking the time to explain how it all play together :) !
Andreas Johansson - Aug 15, 2019 15:54
Ping Quan Mai :) Would love to get answer on at least question number 1 so that I can create my own automation.
Quan Mai - Aug 15, 2019 16:05
Apparently I missed your first comment as the notification for comments is added recently.
I'm not quite sure that I fully understand your questions, TBO. If you are talking about update scripts, like you upgrade from 10.0 to 11.0, then you can add this setting to episerver.framework https://world.episerver.com/documentation/Items/Developers-Guide/Episerver-CMS/8/Deployment/automatic-schema-updates/ and it will take care of the updates for you, both CMS and Commerce.
Andreas Johansson - Aug 16, 2019 7:38
Thanks, I understood it as updateDatabaseSchema="true" only worked with CMS. Then it's just the initial creation of the database (createDatabaseSchema="true") that needs to be manually scripted using the sql-file David Knipe mentioned.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.