-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
David Walker
committed
Apr 13, 2020
1 parent
12da25e
commit d4e20ea
Showing
7 changed files
with
377 additions
and
3 deletions.
There are no files selected for viewing
270 changes: 270 additions & 0 deletions
270
src/FlightRecorder.Data/Migrations/20200413084833_security.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
src/FlightRecorder.Data/Migrations/20200413084833_security.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,30 @@ | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
namespace FlightRecorder.Data.Migrations | ||
{ | ||
public partial class security : Migration | ||
{ | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "USER", | ||
columns: table => new | ||
{ | ||
id = table.Column<int>(nullable: false) | ||
.Annotation("Sqlite:Autoincrement", true), | ||
UserName = table.Column<string>(type: "VARCHAR(50)", nullable: false), | ||
Password = table.Column<string>(type: "VARCHAR(1000)", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_USER", x => x.id); | ||
}); | ||
} | ||
|
||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "USER"); | ||
} | ||
} | ||
} |
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
28 changes: 28 additions & 0 deletions
28
src/FlightRecorder.Migrations/FlightRecorder.Migrations.csproj
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,28 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\FlightRecorder.Data\FlightRecorder.Data.csproj" /> | ||
<ProjectReference Include="..\FlightRecorder.Entities\FlightRecorder.Entities.csproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.3" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.3"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.3" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Remove="appsettings.json" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Content Include="appsettings.json"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</Content> | ||
</ItemGroup> | ||
</Project> |
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 @@ | ||
using System; | ||
using FlightRecorder.Data; | ||
using Microsoft.EntityFrameworkCore; | ||
|
||
namespace FlightRecorder.Migrations | ||
{ | ||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
FlightRecorderDbContext context = new FlightRecorderDbContextFactory().CreateDbContext(null); | ||
context.Database.Migrate(); | ||
} | ||
} | ||
} |
Oops, something went wrong.