diff --git a/CenRa_POSTGIS/metadata.txt b/CenRa_POSTGIS/metadata.txt index 596b544..00e41a9 100644 --- a/CenRa_POSTGIS/metadata.txt +++ b/CenRa_POSTGIS/metadata.txt @@ -12,7 +12,7 @@ name=CenRa_POSTGIS qgisMinimumVersion=3.0 description=Permet de crée un dossier dans la base PostGis -version=2.2 +version=2.3 author=Conservatoire d'Espaces Naturels de Rhône-Alpes email=si_besoin@cen-rhonealpes.fr @@ -21,7 +21,7 @@ email=si_besoin@cen-rhonealpes.fr # Optional items: # Uncomment the following line and add your changelog entries: -changelog=

CenRa_POSTGIS:


21/01/2025 - Version 2.2:

- Correctif sur la longeur des nom.

07/01/2025 - Version 2.1:

- ByPass du certif ssl ci erreur.

22/10/2024 - Version 2.0:

- Refont du code.

+changelog=

CenRa_POSTGIS:


22/01/2025 - Version 2.3:

- Correctif sur la creation de projet.


21/01/2025 - Version 2.2:

- Correctif sur la longeur des nom.

07/01/2025 - Version 2.1:

- ByPass du certif ssl ci erreur.

22/10/2024 - Version 2.0:

- Refont du code.

# tags are comma separated with spaces allowed tags=cenra, postgis, database diff --git a/CenRa_POSTGIS/postgis_creator.py b/CenRa_POSTGIS/postgis_creator.py index 08c72d7..f5b8573 100644 --- a/CenRa_POSTGIS/postgis_creator.py +++ b/CenRa_POSTGIS/postgis_creator.py @@ -7,7 +7,7 @@ from builtins import str from builtins import object import qgis from qgis.PyQt.QtCore import QSettings -from qgis.PyQt.QtWidgets import QAction, QMenu, QDialog +from qgis.PyQt.QtWidgets import QAction, QMenu, QDialog,QMessageBox from qgis.PyQt.QtGui import QIcon from PyQt5.QtCore import * from PyQt5.QtGui import * @@ -83,8 +83,11 @@ class Postgis_Creator(QDialog, EDITOR_CLASS): SQL_schema = "CREATE SCHEMA " + schema + ";" SQL_GRANT_SCHEMA="GRANT CREATE, USAGE ON SCHEMA "+schema+" TO grp_qgis; GRANT CREATE, USAGE ON SCHEMA "+schema+" TO grp_sig;" - cur.execute(SQL_schema) - cur.execute(SQL_GRANT_SCHEMA) + if self.couche_contour.isChecked() or self.couche_habitat.isChecked() or self.couche_travaux_prevus.isChecked() or self.couche_vierge.isChecked(): + cur.execute(SQL_schema) + cur.execute(SQL_GRANT_SCHEMA) + else: + iface.messageBar().pushMessage("POSTGRESQL :", "Pas de couche sélectionnée, création refusée.", level=Qgis.Warning, duration=30) ### Creation de la table contour if self.couche_contour.isChecked(): # Verifie si la checkbox est cochee diff --git a/plugins.xml b/plugins.xml index 39da68a..b5c9690 100644 --- a/plugins.xml +++ b/plugins.xml @@ -1,8 +1,8 @@ - + - 2.2 + 2.3 3.16 https://plateformesig.cenra-outils.org/ CenRa_POSTGIS.zip @@ -11,7 +11,7 @@ https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_POSTGIS.zip CEN-Rhone-Alpes 2024-02-06 - 2025-01-21 + 2025-01-22 False False cenra,postgis