Competition: What’s your favorite Redgate tool? Enter now.

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

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

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

I am using MySQL version 5.7.12, which does seem to be supported by the software.

Am I missing something?


Sign In or Register to comment.