Regarding the addition of new regions and provinces/states.
Regions
This requires a unique NUMERIC field “code_region”. “Unique” as in unique for the entire table, not just this country!
So, some sort of standard should be followed to have logical global codes here. This is further complicated by being only a numeric field.
Looking at the installation sql, I see no logical numbering used with respect to the rest of the world!
One idea would be to append the ISO three digit code to the end.
eg for France
-- Regions France (id country=1)
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 2,'97209',3,'Martinique');
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 3,'97302',3,'Guyane');
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 4,'97411',3,'Réunion');
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 6,'97601',3,'Mayotte');
Similarly for provinces.
“fk_region” = “code_region” in the previous example.
“code_departement” is some unique alphanumeric code for the province, and again it must be unique for the entire table. Here it would make sense to use an ISO code as a prefix.
-- Departements France (id country=1)
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 1,'971','97105',3,'GUADELOUPE','Guadeloupe');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 2,'972','97209',3,'MARTINIQUE','Martinique');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 3,'973','97302',3,'GUYANE','Guyane');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 4,'974','97411',3,'REUNION','Réunion');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 6,'976','97601',3,'MAYOTTE','Mayotte');
My point about all this is that there should be some guidance about the creation of these two unique codes as at the moment they can be anything at all…until you come to insert new ones and find they are already in use.