more necessary initializations
Some checks failed
gitea.arg.rip/_template-service/pipeline/head There was a failure building this commit

This commit is contained in:
adam 2024-12-13 16:14:48 -05:00
parent f9903da2d4
commit bb1cc82fcc
3 changed files with 8 additions and 4 deletions

View File

@ -5,5 +5,5 @@
"Microsoft.AspNetCore": "Warning" "Microsoft.AspNetCore": "Warning"
} }
}, },
"DBConnectionString": "Host=localhost;Database=$REPO_NAME_dev;Username=$REPO_NAME;Password=wnmhOttjA0wCiR9hVoG7jjrf90SxWvAV;IncludeErrorDetail=true;" "DBConnectionString": "Host=localhost;Database=${REPO_NAME}_dev;Username=$REPO_NAME;Password=wnmhOttjA0wCiR9hVoG7jjrf90SxWvAV;IncludeErrorDetail=true;"
} }

View File

@ -10,14 +10,18 @@ case "$$1" in
sudo -u postgres psql -c "create user $$servicename with encrypted password '$$pw_developmentdatabase';" sudo -u postgres psql -c "create user $$servicename with encrypted password '$$pw_developmentdatabase';"
sudo -u postgres psql -c "grant all privileges on database $${servicename}_dev to $$servicename;" sudo -u postgres psql -c "grant all privileges on database $${servicename}_dev to $$servicename;"
sudo -u postgres psql -d "$${servicename}_dev" -c "GRANT ALL ON SCHEMA public TO $$servicename" sudo -u postgres psql -d "$${servicename}_dev" -c "GRANT ALL ON SCHEMA public TO $$servicename"
cp appsettings.sample.json appsettings.json
;; ;;
"dbupdate") "add-migration")
dotnet ef migrations add "$$2" dotnet ef migrations add "$$2"
dotnet ef database update --connection "$$connnectionstr";; dotnet ef database update --connection "$$connnectionstr";;
"dbupdate")
dotnet ef database update --connection "$$connnectionstr";;
*) *)
echo "Unknown command '$$1', try 'initial'" ;; echo "Unknown command '$$1', try 'initial'" ;;
esac esac

View File

@ -7,7 +7,7 @@ namespace $REPO_NAME;
public partial class greynsvcDBContext : DbContext public partial class greynsvcDBContext : DbContext
{ {
public DbSet<GreetCounter> Channels { get; set; } public DbSet<GreetCounter> Greets { get; set; }
public greynsvcDBContext() { } public greynsvcDBContext() { }
public greynsvcDBContext(DbContextOptions<greynsvcDBContext> options) : base(options) { } public greynsvcDBContext(DbContextOptions<greynsvcDBContext> options) : base(options) { }