Template
forked from CEN-RA/Plugin_QGIS
Block la création de shema sans table
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user