MySQL Compare Script Missing Generated Column Definition
John_Citizen
Posts: 1 New member
I am using MySQL Compare version 1.0.1.4.
The comparison detects a table in the source database that is not in the target database.
This is the SQL that it generates:
This is missing the definition of the generated column. It should look like this (I have generated this in MySQL Workbench for the table in the source database):
I am using MySQL version 5.7.12, which does seem to be supported by the software.
Am I missing something?
The comparison detects a table in the source database that is not in the target database.
This is the SQL that it generates:
CREATE TABLE `test_schema`.`TestTable` (
`TestDateTimeCol` datetime NULL,
`TestGeneratedCol` tinyint(4) NULL VIRTUAL GENERATED
) ENGINE=InnoDB DEFAULT CHARSET=latin1
This is missing the definition of the generated column. It should look like this (I have generated this in MySQL Workbench for the table in the source database):
CREATE TABLE `TestTable` (
`TestDateTimeCol` datetime DEFAULT NULL,
`TestGeneratedCol` tinyint(4) GENERATED ALWAYS AS ((case when isnull(`TestDateTimeCol`) then 0 else 1 end)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
I am using MySQL version 5.7.12, which does seem to be supported by the software.
Am I missing something?
Answers