SQLite to MySQL script fails to create working SQL scripts

I currently have Seafile 10.0.1 on Debian 12 and with the SQLite now deprecated, I tried the script linked in the official documentation. The scripts generated what at a quick glance looked right, but the result does not import into MariaDB as expected. The script produces .sql files that need to be edited by hand so the tables are created in specific order. This does not appear to be enough, as the table custom_share_permission has an invalid create statement:

CREATE TABLE IF NOT EXISTS `custom_share_permission` (`id` integer NOT NULL PRIMARY KEY AUTO_INCREMENT AUTO_INCREMENT, `repo_id` varchar(36) NOT NULL, `name` varchar(255) NOT NULL, `description` varchar(500) NOT NULL, `permission` , `reporter` text NOT NULL) ENGINE=INNODB;

and drafts_draftreviewer table creation refers to a table that is not defined anywhere in the resulting scripts:

CREATE TABLE IF NOT EXISTS `drafts_draftreviewer` (`id` integer NOT NULL PRIMARY KEY AUTO_INCREMENT AUTO_INCREMENT, `reviewer` varchar(255) NOT NULL, `draft_id` integer NOT NULL REFERENCES `drafts_draft_old` (`id`)) ENGINE=INNODB;

I had for custom_share_permission excactly the same issue (and another issue),

so it seems a not just a one-off issue, unfortunately have not gotten answer either

1 Like

I have this problem too, and have no idea how to fix this problem