6 ms·
DataMapper's dm-constraints plugin (https://github.com/datamapper/dm-constraints https://github.com/datamapper/dm-constraints) can automatically add foreign key
by gcampbell 16y ago
DataMapper's dm-constraints plugin (https://github.com/datamapper/dm-constraints https://github.com/datamapper/dm-constraints) can automatically add foreign key constraints to your associations, which has the side effect (in MySQL at least) of creating indices on the foreign key columns if they don't already exist.