From ea5ada38b31c2e344fbf38639983d3c93aec5017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Ros?= Date: Thu, 25 Jan 2024 11:56:16 -0800 Subject: [PATCH] Revert "yessql.db -> OrchardCore.db (#7446)" (#15167) This reverts commit 43a7a2d62d2e1ea6d422253545859f3daa2d37ed. # Conflicts: # src/OrchardCore/OrchardCore.Data.YesSql/Options/SqliteOptions.cs --- .../OrchardCore.Data.YesSql/Options/SqliteOptions.cs | 5 ----- src/OrchardCore/OrchardCore.Data.YesSql/SqliteHelper.cs | 2 +- src/docs/reference/core/Data/README.md | 5 ----- src/docs/releases/1.9.0.md | 7 ------- 4 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/OrchardCore/OrchardCore.Data.YesSql/Options/SqliteOptions.cs b/src/OrchardCore/OrchardCore.Data.YesSql/Options/SqliteOptions.cs index 82e1bb8c843..cd73cba34ef 100644 --- a/src/OrchardCore/OrchardCore.Data.YesSql/Options/SqliteOptions.cs +++ b/src/OrchardCore/OrchardCore.Data.YesSql/Options/SqliteOptions.cs @@ -15,10 +15,5 @@ public class SqliteOptions /// /// public bool UseConnectionPooling { get; set; } = true; - - /// - /// Gets or sets the database name. Defaults to OrchardCore.db. - /// - public string DatabaseName { get; set; } = "OrchardCore.db"; } } diff --git a/src/OrchardCore/OrchardCore.Data.YesSql/SqliteHelper.cs b/src/OrchardCore/OrchardCore.Data.YesSql/SqliteHelper.cs index 3036270c147..567bc80227e 100644 --- a/src/OrchardCore/OrchardCore.Data.YesSql/SqliteHelper.cs +++ b/src/OrchardCore/OrchardCore.Data.YesSql/SqliteHelper.cs @@ -12,7 +12,7 @@ public static class SqliteHelper public static string GetConnectionString(SqliteOptions sqliteOptions, string databaseFolder) => new SqliteConnectionStringBuilder { - DataSource = Path.Combine(databaseFolder, sqliteOptions.DatabaseName), + DataSource = Path.Combine(databaseFolder, "yessql.db"), Cache = SqliteCacheMode.Shared, Pooling = sqliteOptions.UseConnectionPooling } diff --git a/src/docs/reference/core/Data/README.md b/src/docs/reference/core/Data/README.md index 377c5969907..c57f6ab46df 100644 --- a/src/docs/reference/core/Data/README.md +++ b/src/docs/reference/core/Data/README.md @@ -6,10 +6,6 @@ Most database configuration is handled automatically, but there are limited opti ### Sqlite -#### `DatabaseName` (string) - -By default, "OrchardCore.db" is used as the name for the SQLite database. This property allows you to use a database name of your choice. For backward compatibility with Orchard Core 1.8 and earlier, configure `"yessql.db"`. - #### `UseConnectionPooling` (boolean) By default in `.NET 6`, `Microsoft.Data.Sqlite` pools connections to the database. It achieves this by putting locking the database file and leaving connections open to be reused. If the lock is preventing tasks like backups, this functionality can be disabled. @@ -23,7 +19,6 @@ See the [`Microsoft.Data.Sqlite` documentation](https://docs.microsoft.com/en-us ```json { "OrchardCore_Data_Sqlite": { - "DatabaseName": "yessql.db", "UseConnectionPooling": false } } diff --git a/src/docs/releases/1.9.0.md b/src/docs/releases/1.9.0.md index 2d846722b0e..be8573406b1 100644 --- a/src/docs/releases/1.9.0.md +++ b/src/docs/releases/1.9.0.md @@ -12,13 +12,6 @@ Additionally, if you needed to enable indexing for text file with `.txt`, `.md` If you needed to enable indexing for other extensions like (`.docx`, or `.pptx`), you'll needed `OrchardCore.Media.Indexing.OpenXML` feature. -### Data Access - -Previously, the `yessql.db` file was used as a default SQLite database for newly created tenants. Now `OrchardCore.db` is used instead, but you can configure the database name using `SqliteOptions.Database`. - -!!! warning - For backward compatibility, you should use `yessql.db` as the database name in the `OrchardCore_Data_Sqlite` configuration. For more info read the [Data (`OrchardCore.Data`) documentation](../reference/core/Data/README.md). - ### SMS Module In the past, we utilized the injection of `ISmsProvider`for sending SMS messages. However, in this release, it is now necessary to inject `ISmsService` instead.