Forráskód Böngészése

Fixed wrong command column creation for old tgis databases.

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55992 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 12 éve
szülő
commit
4bb8828e72
1 módosított fájl, 7 hozzáadás és 7 törlés
  1. 7 7
      lib/python/temporal/core.py

+ 7 - 7
lib/python/temporal/core.py

@@ -183,18 +183,18 @@ def init():
             name = cursor.fetchone()[0]
             if name == "raster_base":
                 db_exists = True
-            
+                
                 # Try to add the command column to the space time dataset metadata tables
                 try:
-                    c.execute('ALTER TABLE strds_metadata ADD COLUMN command VARCHAR;')
+                    cursor.execute('ALTER TABLE strds_metadata ADD COLUMN command VARCHAR;')
                 except:
                     pass
                 try:
-                    c.execute('ALTER TABLE str3ds_metadata ADD COLUMN command VARCHAR;')
+                    cursor.execute('ALTER TABLE str3ds_metadata ADD COLUMN command VARCHAR;')
                 except:
                     pass
                 try:
-                    c.execute('ALTER TABLE stvds_metadata ADD COLUMN command VARCHAR;')
+                    cursor.execute('ALTER TABLE stvds_metadata ADD COLUMN command VARCHAR;')
                 except:
                     pass
                 
@@ -213,15 +213,15 @@ def init():
         if db_exists:
             # Try to add the command column to the space time dataset metadata tables
             try:
-                c.execute('ALTER TABLE strds_metadata ADD COLUMN command VARCHAR;')
+                cursor.execute('ALTER TABLE strds_metadata ADD COLUMN command VARCHAR;')
             except:
                 pass
             try:
-                c.execute('ALTER TABLE str3ds_metadata ADD COLUMN command VARCHAR;')
+                cursor.execute('ALTER TABLE str3ds_metadata ADD COLUMN command VARCHAR;')
             except:
                 pass
             try:
-                c.execute('ALTER TABLE stvds_metadata ADD COLUMN command VARCHAR;')
+                cursor.execute('ALTER TABLE stvds_metadata ADD COLUMN command VARCHAR;')
             except:
                 pass