protected function getCurrentResource($resourceFile)
    {
        $resource = Resource::fromFile($resourceFile, 'migration');

        if (!$resource->hasFields() && !$resource->hasIndexes()) {
            throw new Exception('You must provide at least one field or index to generate the migration');
        }

        return $resource;
    }