Block la création de shema sans table
This commit is contained in:
parent
7c46818923
commit
3301c1395d
@ -12,7 +12,7 @@
|
|||||||
name=CenRa_POSTGIS
|
name=CenRa_POSTGIS
|
||||||
qgisMinimumVersion=3.0
|
qgisMinimumVersion=3.0
|
||||||
description=Permet de crée un dossier dans la base PostGis
|
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
|
author=Conservatoire d'Espaces Naturels de Rhône-Alpes
|
||||||
email=si_besoin@cen-rhonealpes.fr
|
email=si_besoin@cen-rhonealpes.fr
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ email=si_besoin@cen-rhonealpes.fr
|
|||||||
# Optional items:
|
# Optional items:
|
||||||
|
|
||||||
# Uncomment the following line and add your changelog entries:
|
# Uncomment the following line and add your changelog entries:
|
||||||
changelog=<h2>CenRa_POSTGIS:</h2></br><p><h3>21/01/2025 - Version 2.2: </h3> - Correctif sur la longeur des nom.</br></p><p><h3>07/01/2025 - Version 2.1: </h3> - ByPass du certif ssl ci erreur.</br></p><p><h3>22/10/2024 - Version 2.0:</h3>- Refont du code.</p>
|
changelog=<h2>CenRa_POSTGIS:</h2></br><p><h3>22/01/2025 - Version 2.3: </h3> - Correctif sur la creation de projet.</p></br><p><h3>21/01/2025 - Version 2.2: </h3> - Correctif sur la longeur des nom.</br></p><p><h3>07/01/2025 - Version 2.1: </h3> - ByPass du certif ssl ci erreur.</br></p><p><h3>22/10/2024 - Version 2.0:</h3>- Refont du code.</p>
|
||||||
|
|
||||||
# tags are comma separated with spaces allowed
|
# tags are comma separated with spaces allowed
|
||||||
tags=cenra, postgis, database
|
tags=cenra, postgis, database
|
||||||
|
|||||||
@ -7,7 +7,7 @@ from builtins import str
|
|||||||
from builtins import object
|
from builtins import object
|
||||||
import qgis
|
import qgis
|
||||||
from qgis.PyQt.QtCore import QSettings
|
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 qgis.PyQt.QtGui import QIcon
|
||||||
from PyQt5.QtCore import *
|
from PyQt5.QtCore import *
|
||||||
from PyQt5.QtGui import *
|
from PyQt5.QtGui import *
|
||||||
@ -83,8 +83,11 @@ class Postgis_Creator(QDialog, EDITOR_CLASS):
|
|||||||
SQL_schema = "CREATE SCHEMA " + schema + ";"
|
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;"
|
SQL_GRANT_SCHEMA="GRANT CREATE, USAGE ON SCHEMA "+schema+" TO grp_qgis; GRANT CREATE, USAGE ON SCHEMA "+schema+" TO grp_sig;"
|
||||||
|
|
||||||
|
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_schema)
|
||||||
cur.execute(SQL_GRANT_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
|
### Creation de la table contour
|
||||||
if self.couche_contour.isChecked(): # Verifie si la checkbox est cochee
|
if self.couche_contour.isChecked(): # Verifie si la checkbox est cochee
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
<?xml version = '1.0' encoding = 'UTF-8'?>
|
<?xml version = '1.0' encoding = 'UTF-8'?>
|
||||||
<plugins>
|
<plugins>
|
||||||
<pyqgis_plugin name="CenRa_POSTGIS" version="2.2">
|
<pyqgis_plugin name="CenRa_POSTGIS" version="2.3">
|
||||||
<description><![CDATA[Dépôt pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.]]></description>
|
<description><![CDATA[Dépôt pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.]]></description>
|
||||||
<version>2.2</version>
|
<version>2.3</version>
|
||||||
<qgis_minimum_version>3.16</qgis_minimum_version>
|
<qgis_minimum_version>3.16</qgis_minimum_version>
|
||||||
<homepage>https://plateformesig.cenra-outils.org/</homepage>
|
<homepage>https://plateformesig.cenra-outils.org/</homepage>
|
||||||
<file_name>CenRa_POSTGIS.zip</file_name>
|
<file_name>CenRa_POSTGIS.zip</file_name>
|
||||||
@ -11,7 +11,7 @@
|
|||||||
<download_url>https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_POSTGIS.zip</download_url>
|
<download_url>https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_POSTGIS.zip</download_url>
|
||||||
<uploaded_by>CEN-Rhone-Alpes</uploaded_by>
|
<uploaded_by>CEN-Rhone-Alpes</uploaded_by>
|
||||||
<create_date>2024-02-06</create_date>
|
<create_date>2024-02-06</create_date>
|
||||||
<update_date>2025-01-21</update_date>
|
<update_date>2025-01-22</update_date>
|
||||||
<experimental>False</experimental>
|
<experimental>False</experimental>
|
||||||
<deprecated>False</deprecated>
|
<deprecated>False</deprecated>
|
||||||
<tags>cenra,postgis</tags>
|
<tags>cenra,postgis</tags>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user