We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b73f578 commit 06b93efCopy full SHA for 06b93ef
SQLite.CodeFirst/DbInitializers/SqliteDropCreateDatabaseWhenModelChanges.cs
@@ -121,14 +121,18 @@ private void SaveHistory(TContext context)
121
122
private bool IsSameModel(TContext context)
123
{
124
+
125
+ var hash = GetHashFromModel(context.Database.Connection);
126
127
try
128
- var hash = GetHashFromModel(context.Database.Connection);
129
var history = GetHistoryRecord(context);
130
return history?.Hash == hash;
131
}
132
catch (Exception)
133
134
+ // This happens if the history table does not exist.
135
+ // So it covers also the case with a null byte file (see SqliteCreateDatabaseIfNotExists).
136
return false;
137
138
0 commit comments