We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b89e0b4 commit 88f603aCopy full SHA for 88f603a
createdb.sh
@@ -1,3 +1,7 @@
1
-createdb -U postgres -O libertree -E UTF8 libertree_development
2
-createdb -U postgres -O libertree -E UTF8 libertree_test
3
-createdb -U postgres -O libertree -E UTF8 libertree_production
+for db in "test" "development" "production"; do
+ if psql -U postgres -l | grep -wq "libertree_$db"; then
+ echo "Already exists: libertree_$db"
4
+ else
5
+ createdb -U postgres -O libertree -E UTF8 "libertree_$db"
6
+ fi
7
+done
0 commit comments