private static void TruncateLogIfRequired(MigrationRecord record) { if (record.Log == null || record.Log.Length <= MigrationRecord.DefaultMaxLogLength) { return; } var suffix = Environment.NewLine + "… Log limit reached …"; record.Log = record.Log.Substring(0, MigrationRecord.DefaultMaxLogLength - suffix.Length) + suffix; }
public void SaveNew(MigrationRecord record) { EnsureTable(); TruncateLogIfRequired(record); _database.Insert(record); }