diff --git a/appsettings.sample.json b/appsettings.sample.json index 1f8eeb4..96fb449 100644 --- a/appsettings.sample.json +++ b/appsettings.sample.json @@ -5,5 +5,5 @@ "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;" } diff --git a/devuitls.sh b/devuitls.sh index beb2420..ee8286c 100755 --- a/devuitls.sh +++ b/devuitls.sh @@ -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 "grant all privileges on database $${servicename}_dev 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 database update --connection "$$connnectionstr";; + + "dbupdate") dotnet ef database update --connection "$$connnectionstr";; *) echo "Unknown command '$$1', try 'initial'" ;; esac - diff --git a/greynsvcDBContext.cs b/greynsvcDBContext.cs index 0e4a60a..47086b3 100644 --- a/greynsvcDBContext.cs +++ b/greynsvcDBContext.cs @@ -7,7 +7,7 @@ namespace $REPO_NAME; public partial class greynsvcDBContext : DbContext { - public DbSet Channels { get; set; } + public DbSet Greets { get; set; } public greynsvcDBContext() { } public greynsvcDBContext(DbContextOptions options) : base(options) { }