equal
deleted
inserted
replaced
474 column = SQL_PREFIX + rdefdef.name |
474 column = SQL_PREFIX + rdefdef.name |
475 try: |
475 try: |
476 cnx.system_sql(str('ALTER TABLE %s ADD %s %s' |
476 cnx.system_sql(str('ALTER TABLE %s ADD %s %s' |
477 % (table, column, attrtype)), |
477 % (table, column, attrtype)), |
478 rollback_on_failure=False) |
478 rollback_on_failure=False) |
479 self.info('added column %s to table %s', table, column) |
479 self.info('added column %s to table %s', column, table) |
480 except Exception as ex: |
480 except Exception as ex: |
481 # the column probably already exists. this occurs when |
481 # the column probably already exists. this occurs when |
482 # the entity's type has just been added or if the column |
482 # the entity's type has just been added or if the column |
483 # has not been previously dropped |
483 # has not been previously dropped |
484 self.error('error while altering table %s: %s', table, ex) |
484 self.error('error while altering table %s: %s', table, ex) |