I had the same error when I tried to create a new template.
Thanks to Sabrie's answer, I fixed this by droping the sf_folders table (be sure the table is empty) and creating by setting the engine mode to InnoDB. I don't know if this solution is the best one.
So, you just need to run those requests in mysql console :
DROP TABLE sf_folders;
CREATE TABLE sf_folders (
id varchar(40) PRIMARY KEY NOT NULL,
voa_version TINYINT (1))
ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
ROW_FORMAT = DYNAMIC;