cassandra: Fix inconsistency between model and schema, and add test to make sure it does not happen again
eg. like !1045 (comment 135074)
This is reviewable commit-per-commit (please don't squash)
TODO: add a test for the extid change.
Edited by vlorentz