escape dollar signs
Some checks failed
gitea.arg.rip/_template-service/pipeline/head There was a failure building this commit
Some checks failed
gitea.arg.rip/_template-service/pipeline/head There was a failure building this commit
This commit is contained in:
parent
8057477cb5
commit
2a7936714f
18
devuitls.sh
18
devuitls.sh
@ -2,22 +2,22 @@
|
||||
|
||||
servicename="$REPO_NAME"
|
||||
pw_developmentdatabase="wnmhOttjA0wCiR9hVoG7jjrf90SxWvAV"
|
||||
connnectionstr="Host=localhost;Database=${servicename}_dev;Username=${servicename};Password=${pw_developmentdatabase};IncludeErrorDetail=true;"
|
||||
connnectionstr="Host=localhost;Database=$${servicename}_dev;Username=$${servicename};Password=$${pw_developmentdatabase};IncludeErrorDetail=true;"
|
||||
|
||||
case "$1" in
|
||||
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"
|
||||
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"
|
||||
;;
|
||||
|
||||
"dbupdate")
|
||||
dotnet ef migrations add "$2"
|
||||
dotnet ef database update --connection "$connnectionstr";;
|
||||
dotnet ef migrations add "$$2"
|
||||
dotnet ef database update --connection "$$connnectionstr";;
|
||||
|
||||
*)
|
||||
echo "Unknown command '$1', try 'initial'" ;;
|
||||
echo "Unknown command '$$1', try 'initial'" ;;
|
||||
esac
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user