-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Synchronize concentrators between Azure and DB (#1313)
* WIP * Fix typo in SyncConcentratorJobs * Add SynConcentratorsJobTests * Add migration * Add clientThumbprint property in SyncConcentratorJobTests * RetrieveClientThumbprintValue() moved to DeviceHelper
- Loading branch information
1 parent
14c889a
commit fecd9f5
Showing
34 changed files
with
1,165 additions
and
218 deletions.
There are no files selected for viewing
427 changes: 427 additions & 0 deletions
427
src/AzureIoTHub.Portal.Infrastructure/Migrations/20221005134349_Add Concentrator.Designer.cs
Large diffs are not rendered by default.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
src/AzureIoTHub.Portal.Infrastructure/Migrations/20221005134349_Add Concentrator.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright (c) CGI France. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
#nullable disable | ||
|
||
namespace AzureIoTHub.Portal.Infrastructure.Migrations | ||
{ | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
public partial class AddConcentrator : Migration | ||
{ | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
_ = migrationBuilder.CreateTable( | ||
name: "Concentrators", | ||
columns: table => new | ||
{ | ||
Id = table.Column<string>(type: "text", nullable: false), | ||
Name = table.Column<string>(type: "text", nullable: false), | ||
LoraRegion = table.Column<string>(type: "text", nullable: false), | ||
DeviceType = table.Column<string>(type: "text", nullable: false), | ||
ClientThumbprint = table.Column<string>(type: "text", nullable: false), | ||
IsConnected = table.Column<bool>(type: "boolean", nullable: false), | ||
IsEnabled = table.Column<bool>(type: "boolean", nullable: false), | ||
Version = table.Column<int>(type: "integer", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
_ = table.PrimaryKey("PK_Concentrators", x => x.Id); | ||
}); | ||
} | ||
|
||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
_ = migrationBuilder.DropTable( | ||
name: "Concentrators"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/AzureIoTHub.Portal.Infrastructure/Repositories/ConcentratorRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright (c) CGI France. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace AzureIoTHub.Portal.Infrastructure.Repositories | ||
{ | ||
using AzureIoTHub.Portal.Domain.Repositories; | ||
using Domain.Entities; | ||
|
||
public class ConcentratorRepository : GenericRepository<Concentrator>, IConcentratorRepository | ||
{ | ||
public ConcentratorRepository(PortalDbContext context) : base(context) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.