Template
forked from CEN-RA/Plugin_QGIS
fix bug
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
name=CenRa_POSTGIS
|
||||
qgisMinimumVersion=3.0
|
||||
description=Permet de crée un dossier dans la base PostGis
|
||||
version=2.4
|
||||
version=2.5
|
||||
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=<h2>CenRa_POSTGIS:</h2></br><p><h3>23/01/2025 - Version 2.4: </h3> - Correctif sur les pkey.</p></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.</p></br><p><h3>07/01/2025 - Version 2.1: </h3> - ByPass du certif ssl ci erreur.</p></br><p><h3>22/10/2024 - Version 2.0:</h3>- Refont du code.</p>
|
||||
changelog=<h2>CenRa_POSTGIS:</h2></br><p><h3>04/02/2025 - Version 2.5: </h3> - Correctif bug création de couche.</p></br><p><h3>23/01/2025 - Version 2.4: </h3> - Correctif sur les pkey.</p></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.</p></br><p><h3>07/01/2025 - Version 2.1: </h3> - ByPass du certif ssl ci erreur.</p></br><p><h3>22/10/2024 - Version 2.0:</h3>- Refont du code.</p>
|
||||
|
||||
# tags are comma separated with spaces allowed
|
||||
tags=cenra, postgis, database
|
||||
|
||||
@@ -373,16 +373,19 @@ def create_travaux(self,schema,cur,con,host ,port ,dbname ,user ,mdp):
|
||||
def create_habita(self,schema,cur,con,host ,port ,dbname ,user ,mdp):
|
||||
### Creation de la table habitat
|
||||
if self.couche_habitat.isChecked():
|
||||
if self.annee_2.text() == 'aaaa' or self.annee_2.text() == '':
|
||||
if self.annee_2.text() == 'aaaa' or self.annee_2.text() == '':
|
||||
tablename = schema + "_habitat"
|
||||
else :
|
||||
tablename = schema + "_habitat_" + self.annee_2.text()
|
||||
|
||||
tablename_1=tablename+"_points"
|
||||
RETURNE = "SELECT pg_get_serial_sequence('"+schema + "."+ tablename_1[len(schema):]+"','gid')"
|
||||
RETURNE = "SELECT pg_get_serial_sequence('"+schema + "."+tablename_1+"','gid')"
|
||||
tablename_qgis = tablename_1[1:] # Permet d'enlever le "_", ajouter a la premiere etape, dans qgis
|
||||
SQL_VEGETHAB = "CREATE TABLE "+ schema + "."+ tablename_1 + champ_vegethab_point
|
||||
|
||||
print(RETURNE)
|
||||
print('')
|
||||
print(SQL_VEGETHAB)
|
||||
cur.execute(SQL_VEGETHAB)
|
||||
cur.execute(RETURNE)
|
||||
sequence_name = cur.fetchone()[0]
|
||||
|
||||
Reference in New Issue
Block a user