i have the following table change script, that adds a computer column where it combines the country_code and mobile which are defined as big integers (don't ask why)
alter table schema.clients
add phone varchar(50) null;
update schema.clients
set phone = Concat(trim(cast(country_code as char(10))), trim(cast(mobile as char(20))) )
where country_code is not null and mobile is not null;
create unique index idx_phone on schema.clients(id, phone);
Whenever I run this script thru mySQl Workbench i get the following error:
Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column. To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect.
Whats wrong with my script and how can I correct it?