Options

MySQL Compare Script Missing Generated Column Definition

John_CitizenJohn_Citizen Posts: 1 New member
edited November 20, 2020 9:26AM in MySQL Compare
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:

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

  • Options
    A created column is a column in a table that would not  explicitly be set to a specific value in a query Instead, its value is automatically generated based on an expression. 
  • Options
    TechzoanTechzoan Posts: 1 New member
    To start, select Synchronize With Any Source from the Database navigation menu, as the following figure shows. Alternatively, select Synchronize Model to open the same https://mycomputerwindows10.com/ wizard that defaults to a model. A Model or EER diagram must be selected for these synchronization options to be present under the Database navigation menu
Sign In or Register to comment.