alter_type_statement: Consider materialized views

This patch ensures we also update materialized views where the type
being updated occurs.

Signed-off-by: Duarte Nunes <duarte@scylladb.com>
This commit is contained in:
Duarte Nunes
2016-11-16 14:04:42 +00:00
parent a5b7b0464b
commit 21e34c5054

View File

@@ -123,7 +123,11 @@ void alter_type_statement::do_announce_migration(database& db, ::keyspace& ks, b
}
}
if (modified) {
service::get_local_migration_manager().announce_column_family_update(cfm.build(), false, is_local_only).get();
if (schema->is_view()) {
service::get_local_migration_manager().announce_view_update(view_ptr(cfm.build()), is_local_only).get();
} else {
service::get_local_migration_manager().announce_column_family_update(cfm.build(), false, is_local_only).get();
}
}
}