From 5d272b3eb5e411672d910aa60a4df9c6baab53a8 Mon Sep 17 00:00:00 2001 From: Boris Pavlovic Date: Sun, 17 Feb 2013 23:04:04 +0400 Subject: Fix typo/bug in generic UC dropper Change *fields -> *columns. There should be tests for other backends mysql and postgres but at this moment it is not so easy to implement it. Fixes bug 1123848 Change-Id: I65a618760d499501589d5536c9f7dc64483b19ed --- nova/db/sqlalchemy/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nova/db/sqlalchemy/utils.py b/nova/db/sqlalchemy/utils.py index 2faa5021f..c656cbc9c 100644 --- a/nova/db/sqlalchemy/utils.py +++ b/nova/db/sqlalchemy/utils.py @@ -98,10 +98,10 @@ def drop_unique_constraint(migrate_engine, table_name, uc_name, *columns, 4) Rename new table to the name of old table. :param migrate_engine: sqlalchemy engine - :oaram table_name: name of table that contains uniq constarint. + :param table_name: name of table that contains uniq constarint. :param uc_name: name of uniq constraint that will be dropped. :param columns: columns that are in uniq constarint. - :param col_name_col_instance: constains pair column_name=column_instance. + :param col_name_col_instance: contains pair column_name=column_instance. column_instance is instance of Column. These params are required only for columns that have unsupported types by sqlite. For example BigInteger. @@ -110,7 +110,7 @@ def drop_unique_constraint(migrate_engine, table_name, uc_name, *columns, meta = MetaData() meta.bind = migrate_engine t = Table(table_name, meta, autoload=True) - uc = UniqueConstraint(*fields, table=t, name=uc_name) + uc = UniqueConstraint(*columns, table=t, name=uc_name) uc.drop() else: _drop_unique_constraint_in_sqlite(migrate_engine, table_name, uc_name, -- cgit