public function compile($stub, $modelName, $modelData, stdClass $scaffolderConfig, $hash, array $extensions, $extra = null)
    {
        // Add time to migration
        $this->date->addSeconds(5);

        if (File::exists(base_path('scaffolder-config/cache/migration_' . $hash . self::CACHE_EXT)))
        {
            return $this->store($modelName, $scaffolderConfig, '', new FileToCompile(true, $hash));
        }
        else
        {
            $this->stub = $stub;

            $this->replaceClassName($modelName)
                ->replaceTableName($scaffolderConfig, $modelName)
                ->addFields($modelData);

            foreach ($extensions as $extension)
            {
                $this->stub = $extension->runAfterMigrationIsCompiled($this->stub, $modelData, $scaffolderConfig);
            }

            return $this->store($modelName, $scaffolderConfig, $this->stub, new FileToCompile(false, $hash));
        }
    }