Add module foreign key when inserting line data