This commit is contained in:
@@ -480,7 +480,7 @@ namespace AyaNova.Core
|
||||
if (ldb == null)
|
||||
{
|
||||
ldb = new Models.License();
|
||||
ldb.DbId = Guid.NewGuid();
|
||||
ldb.DbId = Guid.NewGuid();//<--Permanent and unchanging DB ID for this database, the license must match this
|
||||
ldb.Key = "none";
|
||||
ct.License.Add(ldb);
|
||||
await ct.SaveChangesAsync();
|
||||
@@ -489,7 +489,7 @@ namespace AyaNova.Core
|
||||
//ensure DB ID
|
||||
if (ldb.DbId == Guid.Empty)
|
||||
{
|
||||
ldb.DbId = Guid.NewGuid();
|
||||
ldb.DbId = Guid.NewGuid();//<--Permanent and unchanging DB ID for this database, the license must match this
|
||||
//Convert the no tracking record fetched above to tracking
|
||||
//this is required because a prior call to initialize before dumping the db would mean the license is still in memory in the context
|
||||
ct.Entry(ldb).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
|
||||
|
||||
Reference in New Issue
Block a user