Skip to content

Commit

Permalink
postgresql: adapt cadastrapp sql paths/pluming
Browse files Browse the repository at this point in the history
required to cope with all the renames/moves in georchestra/cadastrapp#568 ..
  • Loading branch information
landryb committed Aug 2, 2021
1 parent ef1cf84 commit a1c07c0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 29 deletions.
8 changes: 4 additions & 4 deletions roles/postgresql/tasks/cadastrapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,23 +76,23 @@
tags: fetchsql
get_url:
dest: "{{ cadastrappsql.tmpdir }}/{{ item.script }}.sql"
url: https://raw.github.com/georchestra/cadastrapp/master/script/qgis/views/{{ item.script }}.sql
url: https://raw.github.com/georchestra/cadastrapp/master/database/sql/vues/{{ item.script }}.sql
# validate_certs: no
with_items: "{{ cadastrappsql.views }}"

- name: get the sql scripts for tables
tags: fetchsql
get_url:
dest: "{{ cadastrappsql.tmpdir }}/{{ item.script }}.sql"
url: https://raw.github.com/georchestra/cadastrapp/master/script/{{ item.path }}/{{ item.script }}.sql
url: https://raw.github.com/georchestra/cadastrapp/master/database/sql/tables/{{ item.script }}.sql
# validate_certs: no
with_items: "{{ cadastrappsql.tables }}"

- name: get the sql scripts for indexes
tags: fetchsql
get_url:
dest: "{{ cadastrappsql.tmpdir }}/index.sql"
url: https://raw.github.com/georchestra/cadastrapp/master/script/commun/{{ item.script }}.sql
dest: "{{ cadastrappsql.tmpdir }}/{{ item.script }}.sql"
url: https://raw.github.com/georchestra/cadastrapp/master/database/sql/indexes/{{ item.script }}.sql
with_items: "{{ cadastrappsql.indexes }}"

- name: fix the sql scripts
Expand Down
51 changes: 26 additions & 25 deletions roles/postgresql/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,31 @@ other_schemas_urls:
cadastrappsql: {
tmpdir: /tmp/cadastrapp/sql,
views: [
{ script: qgisCommune, view: commune },
{ script: qgisHabitationDetails, view: deschabitation },
{ script: qgisParcelle, view: parcelle },
{ script: qgisProprietaire, view: proprietaire },
{ script: qgisProprietaireParcelle, view: proprietaire_parcelle },
{ script: qgisCoProprieteParcelle, view: co_propriete_parcelle },
{ script: qgisProprieteBatie, view: proprietebatie },
{ script: qgisProprieteNonBatie, view: proprietenonbatie },
{ script: qgisProprieteNonBatieSufExo, view: proprietenonbatiesufexo },
{ script: qgisLot, view: lot },
{ script: qgisSection, view: section } ],
{ script: uf_parcelle, view: uf_parcelle },
{ script: Commune, view: commune },
{ script: HabitationDetails, view: deschabitation },
{ script: Parcelle, view: parcelle },
{ script: Proprietaire, view: proprietaire },
{ script: ProprietaireParcelle, view: proprietaire_parcelle },
{ script: CoProprieteParcelle, view: co_propriete_parcelle },
{ script: ProprieteBatie, view: proprietebatie },
{ script: ProprieteNonBatie, view: proprietenonbatie },
{ script: ProprieteNonBatieSufExo, view: proprietenonbatiesufexo },
{ script: Lot, view: lot },
{ script: Section, view: section } ],
tables: [
{ script: groupe_autorisation, path: commun/user },
{ script: uf_parcelle, path: qgis/tables },
{ script: request_information, path: commun/tables },
{ script: prop_ccodem, path: commun/tables },
{ script: prop_ccodro, path: commun/tables },
{ script: prop_ccoqua, path: commun/tables },
{ script: prop_ccogrm, path: commun/tables },
{ script: prop_dmatgm, path: commun/tables },
{ script: prop_dmatto, path: commun/tables },
{ script: prop_dnatpr, path: commun/tables },
{ script: prop_type_filiation, path: commun/tables },
{ script: prop_ccocac, path: commun/tables },
{ script: prop_ccocac_simple, path: commun/tables } ],
indexes: [ { script: index, index: idxcommunelibcom } ]
{ script: groupe_autorisation },
{ script: request_information },
{ script: prop_bati_detent },
{ script: prop_ccodem },
{ script: prop_ccodro },
{ script: prop_ccoqua },
{ script: prop_ccogrm },
{ script: prop_dmatgm },
{ script: prop_dmatto },
{ script: prop_dnatpr },
{ script: prop_type_filiation },
{ script: prop_ccocac },
{ script: prop_ccocac_simple } ],
indexes: [ { script: indexes_vues_materialisees, index: idxcommunelibcom } ]
}

0 comments on commit a1c07c0

Please sign in to comment.