Skip to content

Commit

Permalink
Added user management
Browse files Browse the repository at this point in the history
  • Loading branch information
davewalker5 committed Feb 18, 2020
1 parent 8216515 commit 4344901
Show file tree
Hide file tree
Showing 18 changed files with 707 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<PackageId>DroneFlightLog.Data.InMemory</PackageId>
<PackageVersion>1.0.0.0</PackageVersion>
<PackageVersion>1.0.0.1</PackageVersion>
<PackOnBuild>true</PackOnBuild>
<Authors>Dave Walker</Authors>
<Copyright>Copyright (c) 2020 Dave Walker</Copyright>
Expand Down
2 changes: 2 additions & 0 deletions src/DroneFlightLog.Data.InMemory/DroneFlightLogDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public class DroneFlightLogDbContext : DbContext, IDroneFlightLogDbContext
public DbSet<FlightPropertyValue> FlightPropertyValues { get; set; }
public DbSet<Location> Locations { get; set; }

public DbSet<FlightLogUser> FlightLogUsers { get; set; }

public DroneFlightLogDbContext(DbContextOptions<DroneFlightLogDbContext> options) : base(options)
{
}
Expand Down
2 changes: 1 addition & 1 deletion src/DroneFlightLog.Data.Migrations/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ConnectionStrings": {
"DroneLogDb": "Data Source=droneflightlog.db"
"DroneLogDb": "Data Source=/Users/dave/droneflightlog.db"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<PackageId>DroneFlightLog.Data.Sqlite</PackageId>
<PackageVersion>1.0.0.1</PackageVersion>
<PackageVersion>1.0.0.3</PackageVersion>
<PackOnBuild>true</PackOnBuild>
<Authors>Dave Walker</Authors>
<Copyright>Copyright (c) 2020 Dave Walker</Copyright>
<Owners>Dave Walker</Owners>
<PackageReleaseNotes>Added EF Core Migrations</PackageReleaseNotes>
<PackageReleaseNotes>Added flight log user for security support</PackageReleaseNotes>
<Summary>Drone Flight Logging SQLite Database Layer</Summary>
<PackageTags>Drone UAV Log Flight Logbook</PackageTags>
<Title>Drone Flight Logging SQLite Database Layer</Title>
Expand Down
2 changes: 2 additions & 0 deletions src/DroneFlightLog.Data.Sqlite/DroneFlightLogDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public class DroneFlightLogDbContext : DbContext, IDroneFlightLogDbContext
public DbSet<FlightPropertyValue> FlightPropertyValues { get; set; }
public DbSet<Location> Locations { get; set; }

public DbSet<FlightLogUser> FlightLogUsers { get; set; }

public DroneFlightLogDbContext(DbContextOptions<DroneFlightLogDbContext> options) : base(options)
{
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using Microsoft.EntityFrameworkCore.Migrations;

namespace DroneFlightLog.Data.Sqlite.Migrations
{
public partial class security : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "FlightLogUsers",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
UserName = table.Column<string>(nullable: true),
Password = table.Column<string>(nullable: true),
Token = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_FlightLogUsers", x => x.Id);
});
}

protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "FlightLogUsers");
}
}
}
Loading

0 comments on commit 4344901

Please sign in to comment.