Update ingest axione to add date in refimm table for API

This commit is contained in:
Johan Le Baut 2022-12-09 15:21:07 +01:00
parent 8a1c95f9ad
commit a3e165ec45
2 changed files with 4 additions and 4 deletions

View file

@ -79,9 +79,9 @@ fi
echo "[+] Create separate table with id immeuble index and its state."
cat > "${tmpSql}" <<EOF
CREATE TABLE refimm (IdentifiantImmeuble text NOT NULL, EtatImmeuble text NOT NULL);
CREATE TABLE refimm (IdentifiantImmeuble text NOT NULL, EtatImmeuble text NOT NULL, DateDebutAcceptationCmdAcces text NOT NULL);
CREATE UNIQUE INDEX idx_IdentifiantImmeuble on refimm (IdentifiantImmeuble);
INSERT OR REPLACE INTO refimm SELECT IdentifiantImmeuble,EtatImmeuble FROM ipe;
INSERT OR REPLACE INTO refimm SELECT IdentifiantImmeuble,EtatImmeuble, DateDebutAcceptationCmdAcces FROM ipe;
EOF
sqlite3 "${fullDbPath}" < "${tmpSql}"

View file

@ -2,6 +2,6 @@
set -euo pipefail
export PATH="/usr/bin/:/bin/:/srv/www/Axione-FTTH-Test/.poetry/bin/"
export PATH="/usr/bin/:/bin/:/srv/www/ftth-ipe-map/.poetry/bin"
poetry install
poetry run gunicorn -b "localhost:${PORT}" --timeout 120 'main:app'
poetry run gunicorn -b "localhost:${PORT}" --timeout 120 'main:app'