Yes you have syntax error
First of all the
-- Create Table: name_fields
-------------------------------------------------------------------------------
Should be in one line you need to check this
something like
-- Create Table: name_fields ------------------------------------------------------
2nd thing
CREATE TABLE name_fields
(
`` VARCHAR(250) NULL
)
ENGINE=INNODB
Where is the column name ? you have just specified ``. The same is for name_api table too, correct these and it should work.