MySql Error When Installing Custom Block

Permalink 1 user found helpful
Hi, this is my first block type I'm creating with Concrete5. I'm getting this error when I try to install my block type:
mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' typeOfEntries VARCHAR, numberOfEntries NUMERIC, ' at line 3] in EXECUTE("CREATE TABLE btFacebookFeed ( bID INTEGER UNSIGNED NOT NULL, pageUrl VARCHAR, typeOfEntries VARCHAR, numberOfEntries NUMERIC, PRIMARY KEY (bID) )")

Here's my db.xml file contents:
<?xml version="1.0"?>
<schema version="0.3">
   <table name="btFacebookFeed">
      <field name="bID" type="I">
         <key />
         <unsigned />
      </field>
      <field name="pageUrl" type="C">
      </field>
      <field name="typeOfEntries" type="C">
      </field>
      <field name="numberOfEntries" type="N">
      </field>
   </table>
</schema>


I'd appreciate any help. Thanks!

EDIT: By the way, I'm using Concrete5 v.5.6.1.2

jrouwhorst
 
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
You could try changing the N to I for numberOfEntries.

May also be a good idea to specify a size for the C fields.
jrouwhorst replied on at Permalink Reply
jrouwhorst
Thanks a lot! Adding the size attributes is what did it.

Here's the xml that worked:
<?xml version="1.0"?>
<schema version="0.3">
   <table name="btFacebookFeed">
      <field name="bID" type="I">
         <key />
         <unsigned />
      </field>
      <field name="pageUrl" type="C" size="255">
      </field>
      <field name="typeOfEntries" type="C" size="255">
      </field>
      <field name="numberOfEntries" type="I">
      </field>
   </table>
</schema>