Roundcube Community Forum

Third Party Contributions => API Based Plugins => Topic started by: NismoC32 on January 08, 2020, 03:16:51 AM

Title: ident_switch DB import error
Post by: NismoC32 on January 08, 2020, 03:16:51 AM
I have recently updated from RC 1.3 to 1.4 (Currently 1.4.2)
Everything went OK accept the ident_switch plugin.
I did have an older version running in 1.3 so decided to delete that version and the sql entries.
I then manually installed the latest version 4.2 since the latest verison in the rouncube repo is 4.01

Well the problem started when I was importing the mysql.initial.sql to the roundcube db

This is the error I get from phpMyAdmin:
-------------------------------------------------------------------------------------------------
Error

Static analysis:

2 errors were found during analysis.

    Unexpected beginning of statement. (near "label" at position 0)
    Unrecognized statement type. (near "varchar" at position 8)

SQL query:

label varchar(32), flags int NOT NULL DEFAULT 0, smtp_host varchar(64), smtp_port int CHECK(smtp_port > 0 AND smtp_port <= 65535), UNIQUE KEY user_id_label (user_id, label), CONSTRAINT fk_user_id FOREIGN KEY (user_id) REFERENCES users(user_id) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT fk_identity_id FOREIGN KEY (iid) REFERENCES identities(identity_id) ON DELETE CASCADE ON UPDATE CASCADE, PRIMARY KEY(id), INDEX IX_ident_switch_user_id (user_id), INDEX IX_ident_switch_iid (iid) );

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'label
        varchar(32),
    flags
        int
        NOT NULL
        DEFAULT 0,
  smtp_host
    varcha' at line 1
------------------------------------------------------------------------------------------------------------------
Any ides whats wrong ?
Title: Re: ident_switch DB import error
Post by: ibb-koeln on February 11, 2020, 04:33:14 AM
Hi!

Did you solve the problem? I'm running in the same issue.

Thanks!!
Title: Re: ident_switch DB import error
Post by: ibb-koeln on February 11, 2020, 05:13:59 AM
OK, I somehow found a workaround (without understanding what is really going wrong  :'( ):

In mysql.initial.sql I changed

Code: [Select]
...
imap_delimiter
        char(1),
...

to

Code: [Select]
...
imap_whatever
        char(1),
...

and the script runs just fine. After that I renamed the field manually back to imap_delimiter without problems...