Skip to content

Commit

Permalink
fix(db) : add missing command in the documentaion when updating Users…
Browse files Browse the repository at this point in the history
…Hub in the standalone mode + update install_db.sh
  • Loading branch information
jacquesfize committed Dec 9, 2024
1 parent ce5d200 commit e2884de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -201,5 +201,6 @@ Mise à jour de l'application
cd usershub
source venv/bin/activate
flask db upgrade usershub@head
flask db upgrade utilisateurs@head

* Suivre les éventuelles notes de version spécifiques à chaque version
7 changes: 4 additions & 3 deletions install_db.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
# Make sure root cannot run our script
if [ "$(id -u)" == "0" ]; then
echo "This script must NOT be run as root" 1>&2
exit 1
echo "This script must NOT be run as root" 1>&2
exit 1
fi

. config/settings.ini
Expand All @@ -24,7 +24,7 @@ function database_exists () {
if database_exists $db_name
then
if $drop_apps_db
then
then
echo "Suppression de la base..."
sudo -n -u postgres -s dropdb $db_name
else
Expand All @@ -44,4 +44,5 @@ fi

source venv/bin/activate
flask db upgrade usershub@head
flask db upgrade utilisateurs@head
deactivate

0 comments on commit e2884de

Please sign in to comment.