From 56cf12735d4391e0f01151c4a61283c45d4fad7e Mon Sep 17 00:00:00 2001 From: alishakawaguchi Date: Tue, 8 Oct 2024 10:53:53 -0700 Subject: [PATCH] Mysql exclude default_generated from generated field to allow javascript transformer (#2781) --- backend/pkg/sqlmanager/mysql/mysql-manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/pkg/sqlmanager/mysql/mysql-manager.go b/backend/pkg/sqlmanager/mysql/mysql-manager.go index 7a2761bc95..442d72e72a 100644 --- a/backend/pkg/sqlmanager/mysql/mysql-manager.go +++ b/backend/pkg/sqlmanager/mysql/mysql-manager.go @@ -35,7 +35,7 @@ func (m *MysqlManager) GetDatabaseSchema(ctx context.Context) ([]*sqlmanager_sha result := []*sqlmanager_shared.DatabaseSchemaRow{} for _, row := range dbSchemas { var generatedType *string - if row.Extra.Valid && strings.Contains(row.Extra.String, "GENERATED") { + if row.Extra.Valid && strings.Contains(row.Extra.String, "GENERATED") && !strings.Contains(row.Extra.String, "DEFAULT_GENERATED") { generatedTypeCopy := row.Extra.String generatedType = &generatedTypeCopy }