Hi, this is about the tables changing between versions and not seeing where that happens in the notes.
I’m running a quick test of v8.2.4 on a bitnami/docker container. I’m comparing to my server version which is now v8.2 but has always had permission problems, discussed in other topics. The docker version works very well for testing so far. I imported my V8.2 database to v8.2.4. I checked to see if any fields changed in the DB through v8.24 and only one field shows an “ALTER…” in the notes from the developers in the upgrade discussion. There are a lot more changes and maybe they could be listed with each version in the future.
When I ran 8.24 in a test scenario, I found 8.24 had new fields in tables that changed somewhere yet I can’t find where that happens. The effect is there will be errors. If you try to use your existing DB name during an upgrade you will lose the entire DB of course since the installation process DROPS the old table then builds the current table with new fields. This is great for new users but previous users have their DB wiped. So, our recourse seems to be to import the old DB to the v8.2.4 DB but the fields are different.
I can’t find the changes listed in the notes. Typically, in my limited experience, other mysql systems provide a simple SQL script to check for new fields or modified fields and then alter the tables and import the data to the new format. That is done as part of the upgrade process and it doesn’t seem too difficult. I don’t see that here yet we have millions of users so some of us must be scripting the new table layouts? I’d like to see the script or help create one for upgrades but unless we have published DB formats and table fields that are changing between versions we cannot know what changed and how to easily upgrade the previous DBs.
Has anyone run into this issue or are people just using new DBs each time. Here is an example of the table “inbound_ email” fields in early V8 and latest 8.24 with major additions. This will fail if you try to use your existing DB. Is there an easy way to assess field changes in these new versions so we can script some fixes? Thanks for the latest work.
Early V8 inbound_email table:
--
-- Table structure for table `inbound_email` with 21 fields
--
CREATE TABLE `inbound_email` (
`id` varchar(36) NOT NULL,
`deleted` tinyint(1) DEFAULT 0,
`date_entered` datetime DEFAULT NULL,
`date_modified` datetime DEFAULT NULL,
`modified_user_id` char(36) DEFAULT NULL,
`created_by` char(36) DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`status` varchar(100) DEFAULT 'Active',
`server_url` varchar(100) DEFAULT NULL,
`email_user` varchar(100) DEFAULT NULL,
`email_password` varchar(100) DEFAULT NULL,
`port` int(5) DEFAULT NULL,
`service` varchar(50) DEFAULT NULL,
`mailbox` text DEFAULT NULL,
`delete_seen` tinyint(1) DEFAULT 0,
`mailbox_type` varchar(10) DEFAULT NULL,
`template_id` char(36) DEFAULT NULL,
`stored_options` text DEFAULT NULL,
`group_id` char(36) DEFAULT NULL,
`is_personal` tinyint(1) DEFAULT 0,
`groupfolder_id` char(36) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Here is the latest inbound_email table with a lot more fields and nothing can be found showing these changes. Someone is deciding to modify the DB so why not publish it with the new version so we can write a script to update existing DB from V8.23 to V8.24 (for example)?
--
-- V8.2.4 Table structure for table `inbound_email` with 33 fields
--
DROP TABLE IF EXISTS `inbound_email`;
CREATE TABLE `inbound_email` (
`id` varchar(36) NOT NULL,
`deleted` tinyint(1) DEFAULT 0,
`date_entered` datetime DEFAULT NULL,
`date_modified` datetime DEFAULT NULL,
`modified_user_id` char(36) DEFAULT NULL,
`created_by` char(36) DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`status` varchar(100) DEFAULT 'Active',
`server_url` varchar(100) DEFAULT NULL,
`connection_string` varchar(255) DEFAULT NULL,
`email_user` varchar(100) DEFAULT NULL,
`email_password` varchar(100) DEFAULT NULL,
`port` int(5) DEFAULT 143,
`service` varchar(50) DEFAULT NULL,
`mailbox` text DEFAULT NULL,
`sentFolder` varchar(255) DEFAULT NULL,
`trashFolder` varchar(255) DEFAULT NULL,
`delete_seen` tinyint(1) DEFAULT 0,
`move_messages_to_trash_after_import` tinyint(1) DEFAULT 0,
`mailbox_type` varchar(10) DEFAULT NULL,
`template_id` char(36) DEFAULT NULL,
`stored_options` text DEFAULT NULL,
`group_id` char(36) DEFAULT NULL,
`is_personal` tinyint(1) DEFAULT 0,
`groupfolder_id` char(36) DEFAULT NULL,
`type` varchar(255) DEFAULT NULL,
`auth_type` varchar(255) DEFAULT 'basic',
`protocol` varchar(255) DEFAULT 'imap',
`is_ssl` tinyint(1) DEFAULT 0,
`distribution_user_id` char(36) DEFAULT NULL,
`outbound_email_id` char(36) DEFAULT NULL,
`create_case_template_id` char(36) DEFAULT NULL,
`external_oauth_connection_id` char(36) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;