fix document migration, replace ? in sql files + replace method must have string in input