IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 28, 2015, 8:28:32 PM (11 years ago)
Author:
eugene
Message:

merge changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150112/ippToPsps/jython/mysql.py

    r37246 r38052  
    258258            self.execute(sql)
    259259        except: pass
    260             #self.logger.warn("Index already in place on '" + column + "' for table '" + table + "'")
     260           
     261           # self.logger.warn("Index already in place on '" + column + "' for table '" + table + "'")
    261262    '''
    262263    Changes the database engine for this table to InnoDb
     
    477478        self.execute("SET @i = 0")
    478479        self.execute("UPDATE " + table + " SET " + colName + "=(@i:=@i+1)")
    479         self.execute("ALTER TABLE " + table + " ADD PRIMARY KEY (" + colName + ")")
    480 
     480        self.execute("ALTER IGNORE TABLE " + table + " ADD PRIMARY KEY (" + colName + ")")
     481
     482    '''                                                                                                                                             
     483    Adds a column to this table which contains a row count                                                                                         
     484    '''
     485    def addRowCountColumnNoKey(self, table, colName):
     486
     487        self.execute("ALTER TABLE " + table + " ADD COLUMN " + colName + " INTEGER FIRST")
     488        self.execute("SET @i = 0")
     489        self.execute("UPDATE " + table + " SET " + colName + "=(@i:=@i+1)")
     490
Note: See TracChangeset for help on using the changeset viewer.