Skip to content

Commit

Permalink
Mysql exclude default_generated from generated field to allow javascr…
Browse files Browse the repository at this point in the history
…ipt transformer (#2781)
  • Loading branch information
alishakawaguchi authored Oct 8, 2024
1 parent cdda34c commit 56cf127
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/pkg/sqlmanager/mysql/mysql-manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 56cf127

Please sign in to comment.