This topic describes options for managing custom database tables when using Episerver Customer-Centric Digital Experience Platform (DXP). You may apply custom database tables sometimes when you need to handle data that does not conform with the provided Episerver table structure.
How it works
When you create a new CMS site from the Episerver Visual Studio integration, it automatically creates the database using the Episerver schema. Each version of the database schema targets a specific version of the product. Episerver CMS supports several SQL Server high-availability options for availability and performance of the database, which include fail-over clustering and database mirroring.
When upgrading, never directly access the tables or stored procedures in the database, or create custom tables that interfere with the tables created by Episerver. Instead, always use the documented API, to avoid backward compatibilty issues on database level.
Managing custom tables
If you need to use custom database tables for your implementation in Digital Experience Platform, you have the following options:
- Use an initialization module. The intialization module should take a depency to EPiServer.Web.InitializationModule, so the Episerver automatic schema updates can run. In the module, you can use migration tools such as Fluent Migrator (GitHub) for altering database schemas.
- Use Entity Framework Code First Migrations (MSDN) to migrate databases.
Note: You can access custom tables only using the standard connection string (that is, EPiServerDB
). If you need custom metadata for entity framework, consider using the connection builder referencing the standard connection string.
Adding Custom Application Settings and/or Custom Connection Strings is supported only through client code. Episerver DXP does not support custom settings within the Azure Portal.
Related topics
Last updated: Apr 02, 2020