diff options
| author | Boris Pavlovic <boris@pavlovic.me> | 2013-02-17 23:04:04 +0400 |
|---|---|---|
| committer | Boris Pavlovic <boris@pavlovic.me> | 2013-02-17 23:17:44 +0400 |
| commit | 5d272b3eb5e411672d910aa60a4df9c6baab53a8 (patch) | |
| tree | f51994e2e3be8ae1a26402b6cd56af441ecd1d36 | |
| parent | ae888be9a356e88589d0ceeb5a777a627c284a4d (diff) | |
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
| -rw-r--r-- | nova/db/sqlalchemy/utils.py | 6 |
1 files 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, |
