diff --git a/Oqtane.Server/Migrations/Tenant/06000101_AddLanguageName.cs b/Oqtane.Server/Migrations/Tenant/06000101_AddLanguageName.cs
new file mode 100644
index 00000000..76fedad6
--- /dev/null
+++ b/Oqtane.Server/Migrations/Tenant/06000101_AddLanguageName.cs
@@ -0,0 +1,32 @@
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Oqtane.Databases.Interfaces;
+using Oqtane.Migrations.EntityBuilders;
+using Oqtane.Repository;
+
+namespace Oqtane.Migrations.Tenant
+{
+ [DbContext(typeof(TenantDBContext))]
+ [Migration("Tenant.06.00.01.01")]
+ public class AddLanguageName : MultiDatabaseMigration
+ {
+ public AddLanguageName(IDatabase database) : base(database)
+ {
+ }
+
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ // Name column was removed in 5.2.4 however SQLite does not support column removal so it had to be restored
+ if (ActiveDatabase.Name != "Sqlite")
+ {
+ var languageEntityBuilder = new LanguageEntityBuilder(migrationBuilder, ActiveDatabase);
+ languageEntityBuilder.AddStringColumn("Name", 100, true);
+ }
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ // not implemented
+ }
+ }
+}
diff --git a/Oqtane.Server/Repository/LanguageRepository.cs b/Oqtane.Server/Repository/LanguageRepository.cs
index 6eac5559..f31a61eb 100644
--- a/Oqtane.Server/Repository/LanguageRepository.cs
+++ b/Oqtane.Server/Repository/LanguageRepository.cs
@@ -31,7 +31,7 @@ namespace Oqtane.Repository
.ToList()
.ForEach(l => l.IsDefault = false);
}
-
+ language.Name = ""; // stored in database but not used (SQLite limitation)
db.Language.Add(language);
db.SaveChanges();
@@ -55,6 +55,7 @@ namespace Oqtane.Repository
.ForEach(l => l.IsDefault = false);
}
+ language.Name = ""; // stored in database but not used (SQLite limitation)
db.SaveChanges();
}
diff --git a/Oqtane.Shared/Models/File.cs b/Oqtane.Shared/Models/File.cs
index e90b6af1..e395bdb5 100644
--- a/Oqtane.Shared/Models/File.cs
+++ b/Oqtane.Shared/Models/File.cs
@@ -56,7 +56,9 @@ namespace Oqtane.Models
public string Description { get; set; }
///
- /// Deprecated - not used
+ /// Deprecated
+ /// Note that this property still exists in the database because columns cannot be dropped in SQLite
+ /// Therefore the property must be retained/mapped even though the framework no longer uses it
///
public bool? IsDeleted { get; set; }
diff --git a/Oqtane.Shared/Models/Folder.cs b/Oqtane.Shared/Models/Folder.cs
index 9aa2aa9c..ef20d937 100644
--- a/Oqtane.Shared/Models/Folder.cs
+++ b/Oqtane.Shared/Models/Folder.cs
@@ -63,7 +63,9 @@ namespace Oqtane.Models
public bool IsSystem { get; set; }
///
- /// Deprecated - not used
+ /// Deprecated
+ /// Note that this property still exists in the database because columns cannot be dropped in SQLite
+ /// Therefore the property must be retained/mapped even though the framework no longer uses it
///
public bool? IsDeleted { get; set; }
diff --git a/Oqtane.Shared/Models/Language.cs b/Oqtane.Shared/Models/Language.cs
index b64a9381..7f226168 100644
--- a/Oqtane.Shared/Models/Language.cs
+++ b/Oqtane.Shared/Models/Language.cs
@@ -29,9 +29,10 @@ namespace Oqtane.Models
///
public bool IsDefault { get; set; }
- [NotMapped]
///
/// Language Name - corresponds to , _not_
+ /// Note that this property still exists in the database because columns cannot be dropped in SQLite
+ /// Therefore the property must be retained/mapped even though the framework populates it from the Culture API
///
public string Name { get; set; }