CakePHP 3 Migrasi Kunci Asing
$table->addIndex(['user_id']);
$table->addForeignKey('user_id', 'users', 'id');
Milad Heidari
$table->addIndex(['user_id']);
$table->addForeignKey('user_id', 'users', 'id');
bin/cake migrations create MyCustomMigration