1

I'm getting database errors when trying update Freeform.

I think I've narrowed it down to one specific mySQL statement, but I don't know enough about mySQL to know what's wrong, I just know that this section from db.freeform.sql causes a syntax error at line 4:

CREATE TABLE IF NOT EXISTS `exp_freeform_fields` (
    `field_id`                      int(10) unsigned    NOT NULL AUTO_INCREMENT,
    `site_id`                       int(10) unsigned    NOT NULL DEFAULT 1,
    `field_name`                    varchar(150)        NOT NULL DEFAULT 'default',
    `field_label`                   varchar(150)        NOT NULL DEFAULT 'default',
    `field_type`                    varchar(50)         NOT NULL DEFAULT 'text',
    `settings`                      text,
    `author_id`                     int(10) unsigned    NOT NULL DEFAULT 0,
    `entry_date`                    int(10) unsigned    NOT NULL DEFAULT 0,
    `edit_date`                     int(10) unsigned    NOT NULL DEFAULT 0,
    `required`                      char(1)             NOT NULL DEFAULT 'n',
    `submissions_page`              char(1)             NOT NULL DEFAULT 'y',
    `moderation_page`               char(1)             NOT NULL DEFAULT 'y',
    `composer_use`                  char(1)             NOT NULL DEFAULT 'y',
    `field_description`             text,
    PRIMARY KEY                     (`field_id`),
    KEY                             (`field_name`),
    KEY                             (`site_id`)
) CHARACTER SET utf8 COLLATE utf8_general_ci ;;

Can anyone spot the issue?

Update: for what it's worth, I just tried to install the latest Freeform for the first time on a different EE installation and got the same error.

3
  • 1
    Don't see anything wrong with that. In fact, when I run the above in an empty database it works without any errors. What error are you getting specifically? Feb 4, 2014 at 21:34
  • Please provide the version of Freeform that you are using, as well as the contents of the actual error that you are seeing.
    – Solspace
    Feb 5, 2014 at 2:07
  • I'm using the latest version, just downloaded today. The error was as follows: Table 'expressionengine_201207.exp_freeform_multipage_hashes' doesn't exist
    – Tim
    Feb 5, 2014 at 4:02

1 Answer 1

1

I think perhaps there was a bad character in my version of the Freeform files. I was able to copy and paste the statement from above and run it successfully, but copy and pasting from the file itself throws an error.

Anyway — after running all the statements in db.freeform.sql individually, all seems well now, thanks for looking.

1
  • For what it's worth, I had to run each of the statements individually in the other EE install as well before I could get the installation to work.
    – Tim
    Feb 4, 2014 at 22:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.