Hey there!
So, I’m updating a website from ojs 2.4.8 to 3.1.1. When I do this, it gives the error that the upgrade script can’t continue since it can’t find ‘locale’ in the database. Its been tracked down to this table.
DROP TABLE IF EXISTS `plugin_settings`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `plugin_settings` (
`plugin_name` varchar(80) NOT NULL,
`locale` varchar(5) NOT NULL DEFAULT '',
`journal_id` bigint(20) NOT NULL,
`setting_name` varchar(80) NOT NULL,
`setting_value` text,
`setting_type` varchar(6) NOT NULL,
PRIMARY KEY (`plugin_name`,`locale`,`journal_id`,`setting_name`),
UNIQUE KEY `plugin_settings_pkey` (`plugin_name`,`locale`,`journal_id`,`setting_name`),
KEY `plugin_settings_plugin_name` (`plugin_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
+-----------------+------------+----------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+-----------------+------------+----------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| plugin_settings | 0 | PRIMARY | 1 | plugin_name | A | 0 | NULL | NULL | | BTREE | | |
| plugin_settings | 0 | PRIMARY | 2 | locale | A | 0 | NULL | NULL | | BTREE | | |
| plugin_settings | 0 | PRIMARY | 3 | journal_id | A | 0 | NULL | NULL | | BTREE | | |
| plugin_settings | 0 | PRIMARY | 4 | setting_name | A | 0 | NULL | NULL | | BTREE | | |
+-----------------+------------+----------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
And these commands are run on the table while the tools/upgrade.php is running.
10 Query SHOW COLUMNS FROM `plugin_settings`
10 Query ALTER TABLE plugin_settings CHANGE COLUMN journal_id context_id BIGINT(20) NOT NULL
10 Query SHOW INDEXES FROM plugin_settings
10 Query SHOW COLUMNS FROM `plugin_settings`
10 Query SHOW COLUMNS FROM `plugin_settings`
10 Query DROP INDEX plugin_settings_pkey ON plugin_settings
10 Query DROP INDEX plugin_settings_plugin_name ON plugin_settings
10 Query ALTER TABLE plugin_settings DROP COLUMN `locale`
I haven’t found anything that would indicate that this site has any custom modifications, especially to the database.
I’d really appreciate any input.