This repository has been archived by the owner on Oct 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: amélioration du rendu des logs et suppression de trace niveau …
…NOTICE superflues
- Loading branch information
Showing
3 changed files
with
33 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,42 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -o pipefail | ||
|
||
# Couleurs ANSI | ||
RED='\033[0;31m' | ||
GREEN='\033[0;32m' | ||
YELLOW='\033[0;33m' | ||
BLUE='\033[0;34m' | ||
CYAN='\033[0;36m' | ||
NC='\033[0m' # No Color (reset) | ||
|
||
# Vérification de la présence du endpoint Metabase dans l'environnement | ||
if [ -z "$METABASE_DB_URL" ];then echo "Pas de serveur Metabase connu ; export abandonné."; exit 0; fi | ||
|
||
# Installe la dernière version de psql | ||
echo -e "${CYAN}→ Installation de la dernière version de \`psql\`${NC}" | ||
dbclient-fetcher psql | ||
echo " " | ||
|
||
# Installe et exporte les requêtes SQL du dossier `queries` | ||
echo -e "${CYAN}→ Désactive les messages de niveau \"NOTICE\"${NC}" | ||
psql $METABASE_DB_URL -c "SET client_min_messages TO WARNING;" | ||
echo " " | ||
|
||
echo -e "${CYAN}→ Installation et export des requêtes SQL du dossier \`queries\`${NC}" | ||
echo -e "${YELLOW} tools/utils/install-sql-scripts.sh queries${NC}" | ||
tools/utils/install-sql-scripts.sh queries | ||
echo " " | ||
|
||
# Exporte les tables de production restantes vers Metabase | ||
echo -e "${CYAN}→ Export des tables de production restantes vers Metabase${NC}" | ||
echo -e "${YELLOW} tools/utils/export-db-metabase.sh${NC}" | ||
tools/utils/export-db-metabase.sh | ||
echo " " | ||
|
||
# Synchronise le schéma de la base de données | ||
echo -e "${CYAN}→ Synchronisation du schéma de la base de données dans Metabase${NC}" | ||
echo -e "${YELLOW} tools/utils/sync-metabase-schemas.sh${NC}" | ||
tools/utils/sync-metabase-schemas.sh | ||
echo " " | ||
|
||
echo -e "${CYAN}→ Réactive les messages de niveau \"NOTICE\"${NC}" | ||
psql $METABASE_DB_URL -c "SET client_min_messages TO NOTICE;" | ||
echo " " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters