public function writeForeignKeysOut($index, OutputInterface $output = null, $force = false)
    {
        if ($this->status !== self::STATUS_RECURSIVE_FOREIGN_KEY) {
            return;
        }

        $class = studly_case('add_foreign_keys_to_' . snake_case($this->table->getTableName()) . '_table');

        $fileName = date('Y_m_d_') . str_pad($index, 6, '0', STR_PAD_LEFT) . '_' . snake_case($class) . '.php';

        $this->writeToFileFromTemplate($this->path . '/' . $fileName, 'migrationAddForeignKey', $output, [
            'className'         => $class,
            'tableName'         => snake_case($this->table->getTableName()),
            'createForeignKeys' => $this->table->renderCreateForeignKeys(),
            'dropForeignKeys'   => $this->table->renderDropForeignKeys(),
        ], $force);
    }