# HG changeset patch # User Alexandre Fayolle # Date 1277046582 0 # Node ID 355d3945c1f39db718505ca674080b6f1602d8e5 # Parent 2bc88fb424bcd8bfedc78b4db6d3eee79be43b49 Use SQL standard ALTER TABLE command (with ADD instead of ADD COLUMN) diff -r 2bc88fb424bc -r 355d3945c1f3 hooks/syncschema.py --- a/hooks/syncschema.py Sun Jun 20 15:08:23 2010 +0000 +++ b/hooks/syncschema.py Sun Jun 20 15:09:42 2010 +0000 @@ -83,7 +83,7 @@ table = SQL_PREFIX + etype column = SQL_PREFIX + rtype try: - session.system_sql(str('ALTER TABLE %s ADD COLUMN %s integer' + session.system_sql(str('ALTER TABLE %s ADD %s integer' % (table, column)), rollback_on_failure=False) session.info('added column %s to table %s', column, table) except: @@ -376,7 +376,7 @@ table = SQL_PREFIX + rdef.subject column = SQL_PREFIX + rdef.name try: - session.system_sql(str('ALTER TABLE %s ADD COLUMN %s %s' + session.system_sql(str('ALTER TABLE %s ADD %s %s' % (table, column, attrtype)), rollback_on_failure=False) self.info('added column %s to table %s', table, column)