feat: add database connections, initial migration and early CLI tooling
All checks were successful
Update changelog / changelog (push) Successful in 25s
All checks were successful
Update changelog / changelog (push) Successful in 25s
This commit is contained in:
29
Controllers/Seeder.cs
Normal file
29
Controllers/Seeder.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Shadow.Controllers;
|
||||
using Shadow.Data;
|
||||
using Shadow.Entities;
|
||||
|
||||
namespace Shadow.Controllers;
|
||||
public class Seeder
|
||||
{
|
||||
private readonly ApplicationDbContext db;
|
||||
private readonly GeneralUseHelpers guhf;
|
||||
|
||||
public Seeder(ApplicationDbContext _db, GeneralUseHelpers _guhf)
|
||||
{
|
||||
db = _db;
|
||||
guhf = _guhf;
|
||||
}
|
||||
public void Seed()
|
||||
{
|
||||
|
||||
// TODO: Ensure [unknown album], [unknown artist] exist
|
||||
|
||||
// TODO: Force add a new user through CLI if no users exist
|
||||
|
||||
|
||||
Console.WriteLine($"You're running Shadow, commit {ThisAssembly.Git.Commit} of branch {ThisAssembly.Git.Branch} ({ThisAssembly.Git.CommitDate})\n");
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user