Skip to content

Commit

Permalink
Revert "yessql.db -> OrchardCore.db (OrchardCMS#7446)" (OrchardCMS#15167
Browse files Browse the repository at this point in the history
)

This reverts commit 43a7a2d.

# Conflicts:
#	src/OrchardCore/OrchardCore.Data.YesSql/Options/SqliteOptions.cs
  • Loading branch information
sebastienros committed Jan 25, 2024
1 parent 25246b0 commit ea5ada3
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,5 @@ public class SqliteOptions
/// <see href="https://docs.microsoft.com/en-us/dotnet/standard/data/sqlite/connection-strings#pooling" />
/// </summary>
public bool UseConnectionPooling { get; set; } = true;

/// <summary>
/// Gets or sets the database name. Defaults to <c>OrchardCore.db</c>.
/// </summary>
public string DatabaseName { get; set; } = "OrchardCore.db";
}
}
2 changes: 1 addition & 1 deletion src/OrchardCore/OrchardCore.Data.YesSql/SqliteHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
5 changes: 0 additions & 5 deletions src/docs/reference/core/Data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
}
}
Expand Down
7 changes: 0 additions & 7 deletions src/docs/releases/1.9.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ea5ada3

Please sign in to comment.