Fix FULLTEXT column generation

Fixes #3618
Fix type casting of string scopes to array in log engines
Removing redudant code.
Filelog with scopes needs the file name to be specified so the first `if` covers scopes too.
trivial optimization