bitrot cleared, runs on dantalion
This commit is contained in:
parent
1b8a714a96
commit
a7afcacee8
31
devuitls.sh
Executable file
31
devuitls.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
servicename="vassago"
|
||||||
|
pw_developmentdatabase="wnmhOttjA0wCiR9hVoG7jjrf90SxWvAV"
|
||||||
|
connnectionstr="Host=localhost;Database=${servicename}_dev;Username=${servicename};Password=${pw_developmentdatabase};IncludeErrorDetail=true;"
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
"initial")
|
||||||
|
sudo -u postgres psql -c "create database ${servicename}_dev;"
|
||||||
|
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
|
||||||
|
dotnet ef database update --connection "$connnectionstr"
|
||||||
|
;;
|
||||||
|
|
||||||
|
"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
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<NoWarn>$(NoWarn);CA2254</NoWarn>
|
<NoWarn>$(NoWarn);CA2254</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
Reference in New Issue
Block a user