Skip to content

Commit cbda133

Browse files
committed
Updated to version 3.12.0.
1 parent 71efb51 commit cbda133

File tree

48 files changed

+3324
-224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+3324
-224
lines changed

MyGeotabAPIAdapter.Configuration/MyGeotabAPIAdapter.Configuration.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.7" />
8+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.9" />
99
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.4" />
10-
<PackageReference Include="NLog.Extensions.Logging" Version="6.0.2" />
10+
<PackageReference Include="NLog.Extensions.Logging" Version="6.0.4" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

MyGeotabAPIAdapter.DataOptimizer/MyGeotabAPIAdapter.DataOptimizer.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<Authors>Geotab Inc.</Authors>
77
<Company>Geotab Inc.</Company>
88
<Product>MyGeotab API Adapter - DataOptimizer</Product>
9-
<AssemblyVersion>3.11.0.0</AssemblyVersion>
10-
<FileVersion>3.11.0.0</FileVersion>
9+
<AssemblyVersion>3.12.0.0</AssemblyVersion>
10+
<FileVersion>3.12.0.0</FileVersion>
1111
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
1212
<Description>A worker service designed to migrate data from the MyGeotab API Adapter database into another set of tables that are optimized for use by applications and data analysis tools. Additional columns are added to some of the tables and these are populated via interpolation or other query-based procedues.</Description>
1313
</PropertyGroup>
@@ -17,10 +17,10 @@
1717
</ItemGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.7" />
20+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.9" />
2121
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.4" />
22-
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
23-
<PackageReference Include="NLog.Extensions.Logging" Version="6.0.2" />
22+
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
23+
<PackageReference Include="NLog.Extensions.Logging" Version="6.0.4" />
2424
</ItemGroup>
2525

2626
<ItemGroup>

MyGeotabAPIAdapter.Database.EntityPersisters/MyGeotabAPIAdapter.Database.EntityPersisters.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="NLog.Extensions.Logging" Version="6.0.2" />
8+
<PackageReference Include="NLog.Extensions.Logging" Version="6.0.4" />
99
</ItemGroup>
1010

1111
<ItemGroup>

MyGeotabAPIAdapter.Database/AdapterDatabaseObjectNames.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ public class AdapterDatabaseObjectNames : IAdapterDatabaseObjectNames
6262
/// <inheritdoc/>
6363
public string DbDutyStatusLogsTableName => "DutyStatusLogs";
6464

65+
/// <inheritdoc/>
66+
public string DbDutyStatusLog2TableName => "DutyStatusLogs2";
67+
6568
/// <inheritdoc/>
6669
public string DbDVIRDefectTableName => "DVIRDefects";
6770

@@ -169,6 +172,9 @@ public class AdapterDatabaseObjectNames : IAdapterDatabaseObjectNames
169172
/// <inheritdoc/>
170173
public string DbStgDutyStatusAvailability2TableName => "stg_DutyStatusAvailability2";
171174

175+
/// <inheritdoc/>
176+
public string DbStgDutyStatusLog2TableName => "stg_DutyStatusLogs2";
177+
172178
/// <inheritdoc/>
173179
public string DbStgDVIRDefect2TableName => "stg_DVIRDefects2";
174180

@@ -247,6 +253,9 @@ public class AdapterDatabaseObjectNames : IAdapterDatabaseObjectNames
247253
/// <inheritdoc/>
248254
public string MergeStagingDutyStatusAvailabilitiesProcedureName => "spMerge_stg_DutyStatusAvailabilities2";
249255

256+
/// <inheritdoc/>
257+
public string MergeStagingDutyStatusLogsProcedureName => "spMerge_stg_DutyStatusLogs2";
258+
250259
/// <inheritdoc/>
251260
public string MergeStagingDVIRDefectsProcedureName => "spMerge_stg_DVIRDefects2";
252261

MyGeotabAPIAdapter.Database/DatabaseValidator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class DatabaseValidator : IDatabaseValidator
1717
// The required version of the middleware database for the current version of the middleware application. Any time the middleware database is updated as part of an application update:
1818
// 1. This value should be updated to reflect the application version at the time.
1919
// 2. Database changes should be included in a single script file and the filename should be formatted as "prefix_version_suffix.sql" (e.g. "MSSQL_3.0.0.0_InitialSchemaCreation.sql") where the version portion of the filename is equal to the value of this constant.
20-
const string RequiredDatabaseVersion = "3.11.0.0";
20+
const string RequiredDatabaseVersion = "3.12.0.0";
2121

2222
readonly IExceptionHelper exceptionHelper;
2323
readonly Logger logger = LogManager.GetCurrentClassLogger();
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
using System.Collections.Generic;
2+
3+
namespace MyGeotabAPIAdapter.Database.Enums
4+
{
5+
/// <summary>
6+
/// A class to hold sentinel ID values used in the Adapter database to represent MyGeotab KnownIds.
7+
/// </summary>
8+
public static class AdapterDbSentinelIdsForMYGKnownIds
9+
{
10+
/// <summary>
11+
/// The Adapter database value that represents the MyGeotab KnownId "NoDeviceId".
12+
/// </summary>
13+
public const long NoDeviceId = -1;
14+
15+
/// <summary>
16+
/// The Adapter database value that represents the MyGeotab KnownId "NoDriverId".
17+
/// </summary>
18+
public const long NoDriverId = -2;
19+
20+
/// <summary>
21+
/// The Adapter database value that represents the MyGeotab KnownId "NoRuleId".
22+
/// </summary>
23+
public const long NoRuleId = -1;
24+
25+
/// <summary>
26+
/// The Adapter database value that represents the MyGeotab KnownId "NoUserId".
27+
/// </summary>
28+
public const long NoUserId = -1;
29+
30+
/// <summary>
31+
/// The Adapter database value that represents the MyGeotab KnownId "NoZoneId".
32+
/// </summary>
33+
public const long NoZoneId = -1;
34+
35+
/// <summary>
36+
/// The Adapter database value that represents the MyGeotab KnownId "UnknownDriverId".
37+
/// </summary>
38+
public const long UnknownDriverId = -3;
39+
}
40+
}

MyGeotabAPIAdapter.Database/IAdapterDatabaseObjectNames.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ public interface IAdapterDatabaseObjectNames
102102
/// </summary>
103103
string DbDutyStatusLogsTableName { get; }
104104

105+
/// <summary>
106+
/// The name of the database table associated with <see cref="DbDutyStatusLog2"/> entities.
107+
/// </summary>
108+
string DbDutyStatusLog2TableName { get; }
105109

106110
/// <summary>
107111
/// The name of the database table associated with <see cref="DbDVIRDefect"/> entities.
@@ -283,6 +287,10 @@ public interface IAdapterDatabaseObjectNames
283287
/// </summary>
284288
string DbStgDutyStatusAvailability2TableName { get; }
285289

290+
/// The name of the database table associated with <see cref="DbStgDutyStatusLog2"/> entities.
291+
/// </summary>
292+
string DbStgDutyStatusLog2TableName { get; }
293+
286294
/// <summary>
287295
/// The name of the database table associated with <see cref="DbStgDVIRDefect2"/> entities.
288296
/// </summary>
@@ -413,6 +421,10 @@ public interface IAdapterDatabaseObjectNames
413421
/// </summary>
414422
string MergeStagingDutyStatusAvailabilitiesProcedureName { get; }
415423

424+
/// The name of the stored procedure or function responsible for merging staging DutyStatusLogs into the main DutyStatusLogs2 table.
425+
/// </summary>
426+
string MergeStagingDutyStatusLogsProcedureName { get; }
427+
416428
/// <summary>
417429
/// The name of the stored procedure or function responsible for merging staging DVIRDefects into the main DVIRDefects2 table.
418430
/// </summary>
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
using Dapper.Contrib.Extensions;
2+
using System;
3+
4+
namespace MyGeotabAPIAdapter.Database.Models
5+
{
6+
[Table("DutyStatusLogs2")]
7+
public class DbDutyStatusLog2 : IDbEntity
8+
{
9+
/// <inheritdoc/>
10+
[Write(false)]
11+
public string DatabaseTableName => "DutyStatusLogs2";
12+
13+
/// <inheritdoc/>
14+
[Write(false)]
15+
public Common.DatabaseWriteOperationType DatabaseWriteOperationType { get; set; }
16+
17+
[ExplicitKey]
18+
public Guid id { get; set; }
19+
//public long id { get; set; }
20+
public string GeotabId { get; set; }
21+
public string Annotations { get; set; }
22+
public string CoDrivers { get; set; }
23+
[ExplicitKey]
24+
public DateTime DateTime { get; set; }
25+
public int? DeferralMinutes { get; set; }
26+
//public Int16? DeferralStatusId { get; set; }
27+
public string DeferralStatus { get; set; }
28+
public long? DeviceId { get; set; }
29+
public float? DistanceSinceValidCoordinates { get; set; }
30+
public long? DriverId { get; set; }
31+
public DateTime? EditDateTime { get; set; }
32+
public long? EditRequestedByUserId { get; set; }
33+
public double? EngineHours { get; set; }
34+
public long? EventCheckSum { get; set; }
35+
public byte? EventCode { get; set; }
36+
public byte? EventRecordStatus { get; set; }
37+
public byte? EventType { get; set; }
38+
public bool? IsHidden { get; set; }
39+
public bool? IsIgnored { get; set; }
40+
public bool? IsTransitioning { get; set; }
41+
public string Location { get; set; }
42+
public double? LocationX { get; set; }
43+
public double? LocationY { get; set; }
44+
public string Malfunction { get; set; }
45+
public double? Odometer { get; set; }
46+
public string Origin { get; set; }
47+
//public long? ParentId { get; set; }
48+
public string ParentId { get; set; }
49+
public long? Sequence { get; set; }
50+
public string State { get; set; }
51+
public string Status { get; set; }
52+
public string UserHosRuleSet { get; set; }
53+
public DateTime? VerifyDateTime { get; set; }
54+
public long Version { get; set; }
55+
56+
[ChangeTracker]
57+
public DateTime RecordCreationTimeUtc { get; set; }
58+
}
59+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
using Dapper.Contrib.Extensions;
2+
using System;
3+
4+
namespace MyGeotabAPIAdapter.Database.Models
5+
{
6+
[Table("stg_DutyStatusLogs2")]
7+
public class DbStgDutyStatusLog2 : IDbEntity
8+
{
9+
/// <inheritdoc/>
10+
[Write(false)]
11+
public string DatabaseTableName => "stg_DutyStatusLogs2";
12+
13+
/// <inheritdoc/>
14+
[Write(false)]
15+
public Common.DatabaseWriteOperationType DatabaseWriteOperationType { get; set; }
16+
17+
[ExplicitKey]
18+
public Guid id { get; set; }
19+
//public long id { get; set; }
20+
public string GeotabId { get; set; }
21+
public string Annotations { get; set; }
22+
public string CoDrivers { get; set; }
23+
[ExplicitKey]
24+
public DateTime DateTime { get; set; }
25+
public int? DeferralMinutes { get; set; }
26+
//public Int16? DeferralStatusId { get; set; }
27+
public string DeferralStatus { get; set; }
28+
public long? DeviceId { get; set; }
29+
public float? DistanceSinceValidCoordinates { get; set; }
30+
public long? DriverId { get; set; }
31+
public DateTime? EditDateTime { get; set; }
32+
public long? EditRequestedByUserId { get; set; }
33+
public double? EngineHours { get; set; }
34+
public long? EventCheckSum { get; set; }
35+
public byte? EventCode { get; set; }
36+
public byte? EventRecordStatus { get; set; }
37+
public byte? EventType { get; set; }
38+
public bool? IsHidden { get; set; }
39+
public bool? IsIgnored { get; set; }
40+
public bool? IsTransitioning { get; set; }
41+
public string Location { get; set; }
42+
public double? LocationX { get; set; }
43+
public double? LocationY { get; set; }
44+
public string Malfunction { get; set; }
45+
public double? Odometer { get; set; }
46+
public string Origin { get; set; }
47+
//public long? ParentId { get; set; }
48+
public string ParentId { get; set; }
49+
public long? Sequence { get; set; }
50+
public string State { get; set; }
51+
public string Status { get; set; }
52+
public string UserHosRuleSet { get; set; }
53+
public DateTime? VerifyDateTime { get; set; }
54+
public long Version { get; set; }
55+
56+
[ChangeTracker]
57+
public DateTime RecordCreationTimeUtc { get; set; }
58+
}
59+
}

MyGeotabAPIAdapter.Database/MyGeotabAPIAdapter.Database.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
<ItemGroup>
1010
<PackageReference Include="Dapper" Version="2.1.66" />
1111
<PackageReference Include="FastMember" Version="1.5.0" />
12-
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.1.0" />
12+
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.1.1" />
1313
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="17.14.15" />
14-
<PackageReference Include="NLog.Extensions.Logging" Version="6.0.2" />
14+
<PackageReference Include="NLog.Extensions.Logging" Version="6.0.4" />
1515
<PackageReference Include="Npgsql" Version="9.0.3" />
1616
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="23.9.1" />
17-
<PackageReference Include="Polly" Version="8.6.2" />
17+
<PackageReference Include="Polly" Version="8.6.3" />
1818
</ItemGroup>
1919

2020
<ItemGroup>

0 commit comments

Comments
 (0)