I have a table "products" and "intervals" table. In the table "products" I have a column called "intervals_id" need to create a foreign key to the id of the table "intervals".
I'm using it, but it's not working:
public function up() {
$refTable = $this->table('products');
$refTable->addForeignKey('intervals_id', 'intervals', 'id');
$refTable->save();
}
I'm doing something wrong?