equal
deleted
inserted
replaced
447 column = SQL_PREFIX + rdefdef.name |
447 column = SQL_PREFIX + rdefdef.name |
448 try: |
448 try: |
449 cnx.system_sql(str('ALTER TABLE %s ADD %s %s' |
449 cnx.system_sql(str('ALTER TABLE %s ADD %s %s' |
450 % (table, column, attrtype)), |
450 % (table, column, attrtype)), |
451 rollback_on_failure=False) |
451 rollback_on_failure=False) |
452 self.info('added column %s to table %s', table, column) |
452 self.info('added column %s to table %s', column, table) |
453 except Exception as ex: |
453 except Exception as ex: |
454 # the column probably already exists. this occurs when |
454 # the column probably already exists. this occurs when |
455 # the entity's type has just been added or if the column |
455 # the entity's type has just been added or if the column |
456 # has not been previously dropped |
456 # has not been previously dropped |
457 self.error('error while altering table %s: %s', table, ex) |
457 self.error('error while altering table %s: %s', table, ex) |