diff --git a/Agent/Agent.csproj b/Agent/Agent.csproj
index 1a42b20b..e7920aa4 100644
--- a/Agent/Agent.csproj
+++ b/Agent/Agent.csproj
@@ -7,7 +7,6 @@
false
Copyright © 2020 Translucency Software
Background service that maintains a connection to the Remotely server. The service is used for remote support and maintenance by this computer's administrators.
- https://doxm.app/EULA
Jared Goodwin
Remotely Agent
Translucency Software
diff --git a/Agent/Services/DeviceSocket.cs b/Agent/Services/DeviceSocket.cs
index d63c1771..6c06dc3b 100644
--- a/Agent/Services/DeviceSocket.cs
+++ b/Agent/Services/DeviceSocket.cs
@@ -60,7 +60,7 @@ namespace Remotely.Agent.Services
await HubConnection.StartAsync();
- var device = Device.Create(ConnectionInfo);
+ var device = await Device.Create(ConnectionInfo);
await HubConnection.InvokeAsync("DeviceCameOnline", device);
@@ -87,15 +87,15 @@ namespace Remotely.Agent.Services
HeartbeatTimer.Start();
}
- public void SendHeartbeat()
+ public async Task SendHeartbeat()
{
- var currentInfo = Device.Create(ConnectionInfo);
- HubConnection.InvokeAsync("DeviceHeartbeat", currentInfo);
+ var currentInfo = await Device.Create(ConnectionInfo);
+ await HubConnection.InvokeAsync("DeviceHeartbeat", currentInfo);
}
- private void HeartbeatTimer_Elapsed(object sender, ElapsedEventArgs e)
+ private async void HeartbeatTimer_Elapsed(object sender, ElapsedEventArgs e)
{
- SendHeartbeat();
+ await SendHeartbeat();
}
private void RegisterMessageHandlers()
diff --git a/Server/Migrations/20191211163438_Initial.Designer.cs b/Server/Migrations/20191211163438_Initial.Designer.cs
deleted file mode 100644
index dc038a98..00000000
--- a/Server/Migrations/20191211163438_Initial.Designer.cs
+++ /dev/null
@@ -1,575 +0,0 @@
-//
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using Remotely.Server.Data;
-
-namespace Remotely.Server.Migrations
-{
- [DbContext(typeof(ApplicationDbContext))]
- [Migration("20191211163438_Initial")]
- partial class Initial
- {
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "3.1.0");
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
- {
- b.Property("Id")
- .HasColumnType("TEXT");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasColumnType("TEXT");
-
- b.Property("Name")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
-
- b.Property("NormalizedName")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
-
- b.HasKey("Id");
-
- b.HasIndex("NormalizedName")
- .IsUnique()
- .HasName("RoleNameIndex");
-
- b.ToTable("AspNetRoles");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("ClaimType")
- .HasColumnType("TEXT");
-
- b.Property("ClaimValue")
- .HasColumnType("TEXT");
-
- b.Property("RoleId")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.HasIndex("RoleId");
-
- b.ToTable("AspNetRoleClaims");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b =>
- {
- b.Property("Id")
- .HasColumnType("TEXT");
-
- b.Property("AccessFailedCount")
- .HasColumnType("INTEGER");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasColumnType("TEXT");
-
- b.Property("Discriminator")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.Property("Email")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
-
- b.Property("EmailConfirmed")
- .HasColumnType("INTEGER");
-
- b.Property("LockoutEnabled")
- .HasColumnType("INTEGER");
-
- b.Property("LockoutEnd")
- .HasColumnType("TEXT");
-
- b.Property("NormalizedEmail")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
-
- b.Property("NormalizedUserName")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
-
- b.Property("PasswordHash")
- .HasColumnType("TEXT");
-
- b.Property("PhoneNumber")
- .HasColumnType("TEXT");
-
- b.Property("PhoneNumberConfirmed")
- .HasColumnType("INTEGER");
-
- b.Property("SecurityStamp")
- .HasColumnType("TEXT");
-
- b.Property("TwoFactorEnabled")
- .HasColumnType("INTEGER");
-
- b.Property("UserName")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
-
- b.HasKey("Id");
-
- b.HasIndex("NormalizedEmail")
- .HasName("EmailIndex");
-
- b.HasIndex("NormalizedUserName")
- .IsUnique()
- .HasName("UserNameIndex");
-
- b.ToTable("RemotelyUsers");
-
- b.HasDiscriminator("Discriminator").HasValue("IdentityUser");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("ClaimType")
- .HasColumnType("TEXT");
-
- b.Property("ClaimValue")
- .HasColumnType("TEXT");
-
- b.Property("UserId")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.HasIndex("UserId");
-
- b.ToTable("AspNetUserClaims");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
- {
- b.Property("LoginProvider")
- .HasColumnType("TEXT")
- .HasMaxLength(128);
-
- b.Property("ProviderKey")
- .HasColumnType("TEXT")
- .HasMaxLength(128);
-
- b.Property("ProviderDisplayName")
- .HasColumnType("TEXT");
-
- b.Property("UserId")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.HasKey("LoginProvider", "ProviderKey");
-
- b.HasIndex("UserId");
-
- b.ToTable("AspNetUserLogins");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
- {
- b.Property("UserId")
- .HasColumnType("TEXT");
-
- b.Property("RoleId")
- .HasColumnType("TEXT");
-
- b.HasKey("UserId", "RoleId");
-
- b.HasIndex("RoleId");
-
- b.ToTable("AspNetUserRoles");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
- {
- b.Property("UserId")
- .HasColumnType("TEXT");
-
- b.Property("LoginProvider")
- .HasColumnType("TEXT")
- .HasMaxLength(128);
-
- b.Property("Name")
- .HasColumnType("TEXT")
- .HasMaxLength(128);
-
- b.Property("Value")
- .HasColumnType("TEXT");
-
- b.HasKey("UserId", "LoginProvider", "Name");
-
- b.ToTable("AspNetUserTokens");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.CommandContext", b =>
- {
- b.Property("ID")
- .HasColumnType("TEXT");
-
- b.Property("CommandMode")
- .HasColumnType("TEXT");
-
- b.Property("CommandResults")
- .HasColumnType("TEXT");
-
- b.Property("CommandText")
- .HasColumnType("TEXT");
-
- b.Property("OrganizationID")
- .HasColumnType("TEXT");
-
- b.Property("PSCoreResults")
- .HasColumnType("TEXT");
-
- b.Property("SenderConnectionID")
- .HasColumnType("TEXT");
-
- b.Property("SenderUserID")
- .HasColumnType("TEXT");
-
- b.Property("TargetDeviceIDs")
- .HasColumnType("TEXT");
-
- b.Property("TimeStamp")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.HasIndex("OrganizationID");
-
- b.ToTable("CommandContexts");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.Device", b =>
- {
- b.Property("ID")
- .HasColumnType("TEXT");
-
- b.Property("AgentVersion")
- .HasColumnType("TEXT");
-
- b.Property("CurrentUser")
- .HasColumnType("TEXT");
-
- b.Property("DeviceGroupID")
- .HasColumnType("TEXT");
-
- b.Property("DeviceName")
- .HasColumnType("TEXT");
-
- b.Property("Drives")
- .HasColumnType("TEXT");
-
- b.Property("FreeMemory")
- .HasColumnType("REAL");
-
- b.Property("FreeStorage")
- .HasColumnType("REAL");
-
- b.Property("Is64Bit")
- .HasColumnType("INTEGER");
-
- b.Property("IsOnline")
- .HasColumnType("INTEGER");
-
- b.Property("LastOnline")
- .HasColumnType("TEXT");
-
- b.Property("OSArchitecture")
- .HasColumnType("INTEGER");
-
- b.Property("OSDescription")
- .HasColumnType("TEXT");
-
- b.Property("OrganizationID")
- .HasColumnType("TEXT");
-
- b.Property("Platform")
- .HasColumnType("TEXT");
-
- b.Property("ProcessorCount")
- .HasColumnType("INTEGER");
-
- b.Property("ServerVerificationToken")
- .HasColumnType("TEXT");
-
- b.Property("Tags")
- .HasColumnType("TEXT")
- .HasMaxLength(200);
-
- b.Property("TotalMemory")
- .HasColumnType("REAL");
-
- b.Property("TotalStorage")
- .HasColumnType("REAL");
-
- b.HasKey("ID");
-
- b.HasIndex("DeviceGroupID");
-
- b.HasIndex("OrganizationID");
-
- b.ToTable("Devices");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.DeviceGroup", b =>
- {
- b.Property("ID")
- .HasColumnType("TEXT");
-
- b.Property("Name")
- .HasColumnType("TEXT")
- .HasMaxLength(200);
-
- b.Property("OrganizationID")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.HasIndex("OrganizationID");
-
- b.ToTable("DeviceGroups");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.EventLog", b =>
- {
- b.Property("ID")
- .HasColumnType("TEXT");
-
- b.Property("EventType")
- .HasColumnType("INTEGER");
-
- b.Property("Message")
- .HasColumnType("TEXT");
-
- b.Property("OrganizationID")
- .HasColumnType("TEXT");
-
- b.Property("Source")
- .HasColumnType("TEXT");
-
- b.Property("StackTrace")
- .HasColumnType("TEXT");
-
- b.Property("TimeStamp")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.HasIndex("OrganizationID");
-
- b.ToTable("EventLogs");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.InviteLink", b =>
- {
- b.Property("ID")
- .HasColumnType("TEXT");
-
- b.Property("DateSent")
- .HasColumnType("TEXT");
-
- b.Property("InvitedUser")
- .HasColumnType("TEXT");
-
- b.Property("IsAdmin")
- .HasColumnType("INTEGER");
-
- b.Property("OrganizationID")
- .HasColumnType("TEXT");
-
- b.Property("ResetUrl")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.HasIndex("OrganizationID");
-
- b.ToTable("InviteLinks");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.Organization", b =>
- {
- b.Property("ID")
- .HasColumnType("TEXT");
-
- b.Property("OrganizationName")
- .HasColumnType("TEXT")
- .HasMaxLength(25);
-
- b.HasKey("ID");
-
- b.ToTable("Organizations");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.SharedFile", b =>
- {
- b.Property("ID")
- .HasColumnType("TEXT");
-
- b.Property("ContentType")
- .HasColumnType("TEXT");
-
- b.Property("FileContents")
- .HasColumnType("BLOB");
-
- b.Property("FileName")
- .HasColumnType("TEXT");
-
- b.Property("OrganizationID")
- .HasColumnType("TEXT");
-
- b.Property("Timestamp")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.HasIndex("OrganizationID");
-
- b.ToTable("SharedFiles");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.RemotelyUser", b =>
- {
- b.HasBaseType("Microsoft.AspNetCore.Identity.IdentityUser");
-
- b.Property("IsAdministrator")
- .HasColumnType("INTEGER");
-
- b.Property("OrganizationID")
- .HasColumnType("TEXT");
-
- b.Property("UserOptions")
- .HasColumnType("TEXT");
-
- b.HasIndex("OrganizationID");
-
- b.HasDiscriminator().HasValue("RemotelyUser");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
- .WithMany()
- .HasForeignKey("RoleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
- .WithMany()
- .HasForeignKey("RoleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.CommandContext", b =>
- {
- b.HasOne("Remotely.Shared.Models.Organization", "Organization")
- .WithMany("CommandContexts")
- .HasForeignKey("OrganizationID");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.Device", b =>
- {
- b.HasOne("Remotely.Shared.Models.DeviceGroup", "DeviceGroup")
- .WithMany("Devices")
- .HasForeignKey("DeviceGroupID");
-
- b.HasOne("Remotely.Shared.Models.Organization", "Organization")
- .WithMany("Devices")
- .HasForeignKey("OrganizationID");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.DeviceGroup", b =>
- {
- b.HasOne("Remotely.Shared.Models.Organization", "Organization")
- .WithMany("DeviceGroups")
- .HasForeignKey("OrganizationID");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.EventLog", b =>
- {
- b.HasOne("Remotely.Shared.Models.Organization", "Organization")
- .WithMany("EventLogs")
- .HasForeignKey("OrganizationID");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.InviteLink", b =>
- {
- b.HasOne("Remotely.Shared.Models.Organization", "Organization")
- .WithMany("InviteLinks")
- .HasForeignKey("OrganizationID");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.SharedFile", b =>
- {
- b.HasOne("Remotely.Shared.Models.Organization", "Organization")
- .WithMany("SharedFiles")
- .HasForeignKey("OrganizationID");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.RemotelyUser", b =>
- {
- b.HasOne("Remotely.Shared.Models.Organization", "Organization")
- .WithMany("RemotelyUsers")
- .HasForeignKey("OrganizationID");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/Server/Migrations/20191212152649_Device alias.Designer.cs b/Server/Migrations/20191212152649_Device alias.Designer.cs
deleted file mode 100644
index f1630eca..00000000
--- a/Server/Migrations/20191212152649_Device alias.Designer.cs
+++ /dev/null
@@ -1,579 +0,0 @@
-//
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using Remotely.Server.Data;
-
-namespace Remotely.Server.Migrations
-{
- [DbContext(typeof(ApplicationDbContext))]
- [Migration("20191212152649_Device alias")]
- partial class Devicealias
- {
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "3.1.0");
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
- {
- b.Property("Id")
- .HasColumnType("TEXT");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasColumnType("TEXT");
-
- b.Property("Name")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
-
- b.Property("NormalizedName")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
-
- b.HasKey("Id");
-
- b.HasIndex("NormalizedName")
- .IsUnique()
- .HasName("RoleNameIndex");
-
- b.ToTable("AspNetRoles");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("ClaimType")
- .HasColumnType("TEXT");
-
- b.Property("ClaimValue")
- .HasColumnType("TEXT");
-
- b.Property("RoleId")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.HasIndex("RoleId");
-
- b.ToTable("AspNetRoleClaims");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b =>
- {
- b.Property("Id")
- .HasColumnType("TEXT");
-
- b.Property("AccessFailedCount")
- .HasColumnType("INTEGER");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasColumnType("TEXT");
-
- b.Property("Discriminator")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.Property("Email")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
-
- b.Property("EmailConfirmed")
- .HasColumnType("INTEGER");
-
- b.Property("LockoutEnabled")
- .HasColumnType("INTEGER");
-
- b.Property("LockoutEnd")
- .HasColumnType("TEXT");
-
- b.Property("NormalizedEmail")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
-
- b.Property("NormalizedUserName")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
-
- b.Property("PasswordHash")
- .HasColumnType("TEXT");
-
- b.Property("PhoneNumber")
- .HasColumnType("TEXT");
-
- b.Property("PhoneNumberConfirmed")
- .HasColumnType("INTEGER");
-
- b.Property("SecurityStamp")
- .HasColumnType("TEXT");
-
- b.Property("TwoFactorEnabled")
- .HasColumnType("INTEGER");
-
- b.Property("UserName")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
-
- b.HasKey("Id");
-
- b.HasIndex("NormalizedEmail")
- .HasName("EmailIndex");
-
- b.HasIndex("NormalizedUserName")
- .IsUnique()
- .HasName("UserNameIndex");
-
- b.ToTable("RemotelyUsers");
-
- b.HasDiscriminator("Discriminator").HasValue("IdentityUser");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("ClaimType")
- .HasColumnType("TEXT");
-
- b.Property("ClaimValue")
- .HasColumnType("TEXT");
-
- b.Property("UserId")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.HasIndex("UserId");
-
- b.ToTable("AspNetUserClaims");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
- {
- b.Property("LoginProvider")
- .HasColumnType("TEXT")
- .HasMaxLength(128);
-
- b.Property("ProviderKey")
- .HasColumnType("TEXT")
- .HasMaxLength(128);
-
- b.Property("ProviderDisplayName")
- .HasColumnType("TEXT");
-
- b.Property("UserId")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.HasKey("LoginProvider", "ProviderKey");
-
- b.HasIndex("UserId");
-
- b.ToTable("AspNetUserLogins");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
- {
- b.Property("UserId")
- .HasColumnType("TEXT");
-
- b.Property("RoleId")
- .HasColumnType("TEXT");
-
- b.HasKey("UserId", "RoleId");
-
- b.HasIndex("RoleId");
-
- b.ToTable("AspNetUserRoles");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
- {
- b.Property("UserId")
- .HasColumnType("TEXT");
-
- b.Property("LoginProvider")
- .HasColumnType("TEXT")
- .HasMaxLength(128);
-
- b.Property("Name")
- .HasColumnType("TEXT")
- .HasMaxLength(128);
-
- b.Property("Value")
- .HasColumnType("TEXT");
-
- b.HasKey("UserId", "LoginProvider", "Name");
-
- b.ToTable("AspNetUserTokens");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.CommandContext", b =>
- {
- b.Property("ID")
- .HasColumnType("TEXT");
-
- b.Property("CommandMode")
- .HasColumnType("TEXT");
-
- b.Property("CommandResults")
- .HasColumnType("TEXT");
-
- b.Property("CommandText")
- .HasColumnType("TEXT");
-
- b.Property("OrganizationID")
- .HasColumnType("TEXT");
-
- b.Property("PSCoreResults")
- .HasColumnType("TEXT");
-
- b.Property("SenderConnectionID")
- .HasColumnType("TEXT");
-
- b.Property("SenderUserID")
- .HasColumnType("TEXT");
-
- b.Property("TargetDeviceIDs")
- .HasColumnType("TEXT");
-
- b.Property("TimeStamp")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.HasIndex("OrganizationID");
-
- b.ToTable("CommandContexts");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.Device", b =>
- {
- b.Property("ID")
- .HasColumnType("TEXT");
-
- b.Property("AgentVersion")
- .HasColumnType("TEXT");
-
- b.Property("Alias")
- .HasColumnType("TEXT")
- .HasMaxLength(100);
-
- b.Property("CurrentUser")
- .HasColumnType("TEXT");
-
- b.Property("DeviceGroupID")
- .HasColumnType("TEXT");
-
- b.Property("DeviceName")
- .HasColumnType("TEXT");
-
- b.Property("Drives")
- .HasColumnType("TEXT");
-
- b.Property("FreeMemory")
- .HasColumnType("REAL");
-
- b.Property("FreeStorage")
- .HasColumnType("REAL");
-
- b.Property("Is64Bit")
- .HasColumnType("INTEGER");
-
- b.Property("IsOnline")
- .HasColumnType("INTEGER");
-
- b.Property("LastOnline")
- .HasColumnType("TEXT");
-
- b.Property("OSArchitecture")
- .HasColumnType("INTEGER");
-
- b.Property("OSDescription")
- .HasColumnType("TEXT");
-
- b.Property("OrganizationID")
- .HasColumnType("TEXT");
-
- b.Property("Platform")
- .HasColumnType("TEXT");
-
- b.Property("ProcessorCount")
- .HasColumnType("INTEGER");
-
- b.Property("ServerVerificationToken")
- .HasColumnType("TEXT");
-
- b.Property("Tags")
- .HasColumnType("TEXT")
- .HasMaxLength(200);
-
- b.Property("TotalMemory")
- .HasColumnType("REAL");
-
- b.Property("TotalStorage")
- .HasColumnType("REAL");
-
- b.HasKey("ID");
-
- b.HasIndex("DeviceGroupID");
-
- b.HasIndex("OrganizationID");
-
- b.ToTable("Devices");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.DeviceGroup", b =>
- {
- b.Property("ID")
- .HasColumnType("TEXT");
-
- b.Property("Name")
- .HasColumnType("TEXT")
- .HasMaxLength(200);
-
- b.Property("OrganizationID")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.HasIndex("OrganizationID");
-
- b.ToTable("DeviceGroups");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.EventLog", b =>
- {
- b.Property("ID")
- .HasColumnType("TEXT");
-
- b.Property("EventType")
- .HasColumnType("INTEGER");
-
- b.Property("Message")
- .HasColumnType("TEXT");
-
- b.Property("OrganizationID")
- .HasColumnType("TEXT");
-
- b.Property("Source")
- .HasColumnType("TEXT");
-
- b.Property("StackTrace")
- .HasColumnType("TEXT");
-
- b.Property("TimeStamp")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.HasIndex("OrganizationID");
-
- b.ToTable("EventLogs");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.InviteLink", b =>
- {
- b.Property("ID")
- .HasColumnType("TEXT");
-
- b.Property("DateSent")
- .HasColumnType("TEXT");
-
- b.Property("InvitedUser")
- .HasColumnType("TEXT");
-
- b.Property("IsAdmin")
- .HasColumnType("INTEGER");
-
- b.Property("OrganizationID")
- .HasColumnType("TEXT");
-
- b.Property("ResetUrl")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.HasIndex("OrganizationID");
-
- b.ToTable("InviteLinks");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.Organization", b =>
- {
- b.Property("ID")
- .HasColumnType("TEXT");
-
- b.Property("OrganizationName")
- .HasColumnType("TEXT")
- .HasMaxLength(25);
-
- b.HasKey("ID");
-
- b.ToTable("Organizations");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.SharedFile", b =>
- {
- b.Property("ID")
- .HasColumnType("TEXT");
-
- b.Property("ContentType")
- .HasColumnType("TEXT");
-
- b.Property("FileContents")
- .HasColumnType("BLOB");
-
- b.Property("FileName")
- .HasColumnType("TEXT");
-
- b.Property("OrganizationID")
- .HasColumnType("TEXT");
-
- b.Property("Timestamp")
- .HasColumnType("TEXT");
-
- b.HasKey("ID");
-
- b.HasIndex("OrganizationID");
-
- b.ToTable("SharedFiles");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.RemotelyUser", b =>
- {
- b.HasBaseType("Microsoft.AspNetCore.Identity.IdentityUser");
-
- b.Property("IsAdministrator")
- .HasColumnType("INTEGER");
-
- b.Property("OrganizationID")
- .HasColumnType("TEXT");
-
- b.Property("UserOptions")
- .HasColumnType("TEXT");
-
- b.HasIndex("OrganizationID");
-
- b.HasDiscriminator().HasValue("RemotelyUser");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
- .WithMany()
- .HasForeignKey("RoleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
- .WithMany()
- .HasForeignKey("RoleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.CommandContext", b =>
- {
- b.HasOne("Remotely.Shared.Models.Organization", "Organization")
- .WithMany("CommandContexts")
- .HasForeignKey("OrganizationID");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.Device", b =>
- {
- b.HasOne("Remotely.Shared.Models.DeviceGroup", "DeviceGroup")
- .WithMany("Devices")
- .HasForeignKey("DeviceGroupID");
-
- b.HasOne("Remotely.Shared.Models.Organization", "Organization")
- .WithMany("Devices")
- .HasForeignKey("OrganizationID");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.DeviceGroup", b =>
- {
- b.HasOne("Remotely.Shared.Models.Organization", "Organization")
- .WithMany("DeviceGroups")
- .HasForeignKey("OrganizationID");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.EventLog", b =>
- {
- b.HasOne("Remotely.Shared.Models.Organization", "Organization")
- .WithMany("EventLogs")
- .HasForeignKey("OrganizationID");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.InviteLink", b =>
- {
- b.HasOne("Remotely.Shared.Models.Organization", "Organization")
- .WithMany("InviteLinks")
- .HasForeignKey("OrganizationID");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.SharedFile", b =>
- {
- b.HasOne("Remotely.Shared.Models.Organization", "Organization")
- .WithMany("SharedFiles")
- .HasForeignKey("OrganizationID");
- });
-
- modelBuilder.Entity("Remotely.Shared.Models.RemotelyUser", b =>
- {
- b.HasOne("Remotely.Shared.Models.Organization", "Organization")
- .WithMany("RemotelyUsers")
- .HasForeignKey("OrganizationID");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/Server/Migrations/20191212152649_Device alias.cs b/Server/Migrations/20191212152649_Device alias.cs
deleted file mode 100644
index 2108ff2b..00000000
--- a/Server/Migrations/20191212152649_Device alias.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using Microsoft.EntityFrameworkCore.Migrations;
-
-namespace Remotely.Server.Migrations
-{
- public partial class Devicealias : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AddColumn(
- name: "Alias",
- table: "Devices",
- maxLength: 100,
- nullable: true);
- }
-
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropColumn(
- name: "Alias",
- table: "Devices");
- }
- }
-}
diff --git a/Server/Migrations/20200215193028_API Tokens.Designer.cs b/Server/Migrations/20200215193028_API Tokens.Designer.cs
deleted file mode 100644
index eded09a2..00000000
--- a/Server/Migrations/20200215193028_API Tokens.Designer.cs
+++ /dev/null
@@ -1,616 +0,0 @@
-//
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using Remotely.Server.Data;
-
-namespace Remotely.Server.Migrations
-{
- [DbContext(typeof(ApplicationDbContext))]
- [Migration("20200215193028_API Tokens")]
- partial class APITokens
- {
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "3.1.1");
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
- {
- b.Property("Id")
- .HasColumnType("TEXT");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasColumnType("TEXT");
-
- b.Property("Name")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
-
- b.Property("NormalizedName")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
-
- b.HasKey("Id");
-
- b.HasIndex("NormalizedName")
- .IsUnique()
- .HasName("RoleNameIndex");
-
- b.ToTable("AspNetRoles");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("ClaimType")
- .HasColumnType("TEXT");
-
- b.Property("ClaimValue")
- .HasColumnType("TEXT");
-
- b.Property("RoleId")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.HasIndex("RoleId");
-
- b.ToTable("AspNetRoleClaims");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b =>
- {
- b.Property("Id")
- .HasColumnType("TEXT");
-
- b.Property("AccessFailedCount")
- .HasColumnType("INTEGER");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasColumnType("TEXT");
-
- b.Property("Discriminator")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.Property("Email")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
-
- b.Property("EmailConfirmed")
- .HasColumnType("INTEGER");
-
- b.Property("LockoutEnabled")
- .HasColumnType("INTEGER");
-
- b.Property("LockoutEnd")
- .HasColumnType("TEXT");
-
- b.Property("NormalizedEmail")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
-
- b.Property("NormalizedUserName")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
-
- b.Property("PasswordHash")
- .HasColumnType("TEXT");
-
- b.Property("PhoneNumber")
- .HasColumnType("TEXT");
-
- b.Property("PhoneNumberConfirmed")
- .HasColumnType("INTEGER");
-
- b.Property("SecurityStamp")
- .HasColumnType("TEXT");
-
- b.Property("TwoFactorEnabled")
- .HasColumnType("INTEGER");
-
- b.Property("UserName")
- .HasColumnType("TEXT")
- .HasMaxLength(256);
-
- b.HasKey("Id");
-
- b.HasIndex("NormalizedEmail")
- .HasName("EmailIndex");
-
- b.HasIndex("NormalizedUserName")
- .IsUnique()
- .HasName("UserNameIndex");
-
- b.ToTable("RemotelyUsers");
-
- b.HasDiscriminator("Discriminator").HasValue("IdentityUser");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("ClaimType")
- .HasColumnType("TEXT");
-
- b.Property("ClaimValue")
- .HasColumnType("TEXT");
-
- b.Property("UserId")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.HasIndex("UserId");
-
- b.ToTable("AspNetUserClaims");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
- {
- b.Property("LoginProvider")
- .HasColumnType("TEXT")
- .HasMaxLength(128);
-
- b.Property("ProviderKey")
- .HasColumnType("TEXT")
- .HasMaxLength(128);
-
- b.Property("ProviderDisplayName")
- .HasColumnType("TEXT");
-
- b.Property("UserId")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.HasKey("LoginProvider", "ProviderKey");
-
- b.HasIndex("UserId");
-
- b.ToTable("AspNetUserLogins");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
- {
- b.Property("UserId")
- .HasColumnType("TEXT");
-
- b.Property("RoleId")
- .HasColumnType("TEXT");
-
- b.HasKey("UserId", "RoleId");
-
- b.HasIndex("RoleId");
-
- b.ToTable("AspNetUserRoles");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
- {
- b.Property