super(UUIDGen.makeType1UUIDFromHost(FBUtilities.getLocalAddress()), DatabaseDescriptor.getDefsVersion());
this.tableName = tableName;
this.oldName = oldName;
this.newName = newName;
KSMetaData ksm = DatabaseDescriptor.getTableDefinition(tableName);
if (ksm == null)
throw new ConfigurationException("Keyspace does not already exist.");
if (!ksm.cfMetaData().containsKey(oldName))
throw new ConfigurationException("CF is not defined in that keyspace.");
if (ksm.cfMetaData().containsKey(newName))
throw new ConfigurationException("CF is already defined in that keyspace.");
if (!Migration.isLegalName(newName))
throw new ConfigurationException("Invalid column family name: " + newName);
cfId = ksm.cfMetaData().get(oldName).cfId;
// clone the ksm, replacing cfm with the new one.
KSMetaData newKsm = makeNewKeyspaceDefinition(ksm);
rm = Migration.makeDefinitionMutation(newKsm, null, newVersion);
}