diff --git a/.github/workflows/dump.yaml b/.github/workflows/dump.yaml index 9cebe52..8f6b158 100644 --- a/.github/workflows/dump.yaml +++ b/.github/workflows/dump.yaml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v3 - name: Criando coleta.csv... - run: PGPASSWORD=${{ secrets.POSTGRES_PASSWORD }} psql -h "${{ secrets.POSTGRES_HOST }}" -U ${{ secrets.POSTGRES_USER }} -d ${{ secrets.POSTGRES_DB }} -c "SELECT TO_CHAR(timestamp, 'YYYY-MM-DD"T"HH:MI:SS.US"Z"') from coletas c;" + run: PGPASSWORD=${{ secrets.POSTGRES_PASSWORD }} psql -h "${{ secrets.POSTGRES_HOST }}" -U ${{ secrets.POSTGRES_USER }} -d ${{ secrets.POSTGRES_DB }} -c "SELECT TO_CHAR(timestamp, 'YYYY-MM-DD\"T\"HH:MI:SS.US\"Z\"') FROM coletas c;" # run: PGPASSWORD=${{ secrets.POSTGRES_PASSWORD }} psql -h "${{ secrets.POSTGRES_HOST }}" -U ${{ secrets.POSTGRES_USER }} -d ${{ secrets.POSTGRES_DB }} -c "\copy (SELECT id as chave_coleta, id_orgao as orgao, mes, ano, TO_CHAR(timestamp, 'YYYY-MM-DD"T"HH24:MI:SS.US"Z"') as timestampb_coleta, repositorio_coletor, versao_coletor, repositorio_parser, versao_parser FROM coletas WHERE (procinfo is null or procinfo::text = 'null') and atual=true) TO 'dump/coleta.csv' csv header delimiter ';';" # - name: Criando metadados.csv...