cubicweb #1768109 [migration] add_cube will create missing entities from unrelated cubes [deprecated]

suppose cube cube_A depends on cube_B. You want to migrate cube_A from version 1 to version 2, and cube_B from version 10 to 11. cube_B-11 introduces a new dependency on cube_C, and cube_A-2 adds a new etype.

cubicweb-ctl upgrade will run the cube_B migration script which will execute add_cube('cube_C'). This action will as a side effect create the the new etype (and probably the new rtypes and rdefs) introduced by cube_A-2 (depending on the location of the add_cube call in the migration script, the same thing will happen for new schema objects strictly belonging to cube_B-11). The consequence is that the traditional unguarded calls to add_entity_type (resp add_relation_definition, etc.) in the cube_A-2 migration script will fail because the etypes already exist in the schema.

done in3.16.1
load left0.000
closed by<not specified>