Skip to content

Commit

Permalink
start storing parsed hash from movie files into the submissions table
Browse files Browse the repository at this point in the history
  • Loading branch information
adelikat committed Dec 1, 2024
1 parent 6d5a46b commit 995789e
Show file tree
Hide file tree
Showing 7 changed files with 3,523 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Migrations.Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ The usual Migration workflow looks like this:
This is simply going into the Entity folder and adding/modifying/deleting Properties or Classes like you would any other C# code. Note that you can't run the project with these changes before you migrate by following the next steps.
2. Instruct EF Core to generate a Migration.
In the Package Manager Console or PowerShell window, move to the solution directory (which should be the default location), and run the following command:

dotnet ef migrations --project TASVideos.Data --startup-project TASVideos add NameOfMigration

Name the Migration something like "AddSubmissionCycleCount" or "RemoveRatingType".
You should see 2 files be added with the name of your Migration, and 1 modified ModelSnapshot file.
3. Apply the Migration.
Expand Down
3 changes: 3 additions & 0 deletions TASVideos.Data/Entity/Submission.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ public class Submission : BaseEntity, ITimeable
public int? GameGoalId { get; set; }
public GameGoal? GameGoal { get; set; }

public string? HashType { get; set; }
public string? Hash { get; set; }

public void GenerateTitle()
{
if (System is null)
Expand Down
Loading

0 comments on commit 995789e

Please sign in to comment.