Added persistent unique ids to all elements
This commit is contained in:
10 files changed
+334
-1
No files matched your search
@@ -0,0 +1,23 @@
|
||||
using DataModel.Database.Common;
|
||||
|
||||
namespace DataModel.MigrationScripts;
|
||||
|
||||
public static class Script202211AddUniqueIds
|
||||
{
|
||||
public static async Task PostMigrationAsync(DataContext db)
|
||||
{
|
||||
await foreach (var setting in db.Settings)
|
||||
setting.UniqueId = Guid.NewGuid();
|
||||
|
||||
await foreach(var section in db.Sections)
|
||||
section.UniqueId = Guid.NewGuid();
|
||||
|
||||
await foreach (var textElement in db.TextElements)
|
||||
textElement.UniqueId = Guid.NewGuid();
|
||||
|
||||
await foreach (var translation in db.Translations)
|
||||
translation.UniqueId = Guid.NewGuid();
|
||||
|
||||
await db.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user