diff --git a/cloudkitty/rating/hash/db/sqlalchemy/alembic/versions/10d2738b67df_rename_mapping_table_to_hashmap_mappings.py b/cloudkitty/rating/hash/db/sqlalchemy/alembic/versions/10d2738b67df_rename_mapping_table_to_hashmap_mappings.py new file mode 100644 index 00000000..513f64d2 --- /dev/null +++ b/cloudkitty/rating/hash/db/sqlalchemy/alembic/versions/10d2738b67df_rename_mapping_table_to_hashmap_mappings.py @@ -0,0 +1,21 @@ +"""Rename mapping table to hashmap_mappings. + +Revision ID: 10d2738b67df +Revises: 54cc17accf2c +Create Date: 2016-05-24 18:37:25.305430 + +""" + +# revision identifiers, used by Alembic. +revision = '10d2738b67df' +down_revision = '54cc17accf2c' + +from alembic import op + + +def upgrade(): + op.rename_table('hashmap_maps', 'hashmap_mappings') + + +def downgrade(): + op.rename_table('hashmap_mappings', 'hashmap_maps') diff --git a/cloudkitty/rating/hash/db/sqlalchemy/models.py b/cloudkitty/rating/hash/db/sqlalchemy/models.py index b035bdba..b9dec5f0 100644 --- a/cloudkitty/rating/hash/db/sqlalchemy/models.py +++ b/cloudkitty/rating/hash/db/sqlalchemy/models.py @@ -201,7 +201,7 @@ class HashMapMapping(Base, HashMapBase): Used to model final equation. """ - __tablename__ = 'hashmap_maps' + __tablename__ = 'hashmap_mappings' fk_to_resolve = { 'service_id': 'service.service_id', 'field_id': 'field.field_id',