5
Yes Bandit-X, that sure helps, it was what I was looking for
EDIT: OK, it's working fine now.
Anyway, I think that the parsing system used when executing the sql file specified in
$modversion['sqlfile']['mysql'] = "sqlfile.sql";
should allow to introduce constraints as well. You can have "create table" and "insert into" sentences and it adds the DB prefix to all table names right, but constraints are not supported in this way, so you have to use alter table afterwards using "oninstall"