Skip to content

Commit

Permalink
Fix enum generation for mysql
Browse files Browse the repository at this point in the history
  • Loading branch information
aarondl committed Nov 17, 2021
1 parent 3ee2df7 commit 5dbdebc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic
Versioning](http://semver.org/spec/v2.0.0.html).

## [v4.8.3] - 2021-11-16

### Fixed

- Fix bad use of titlecase in mysql enum name generation

## [v4.8.2] - 2021-11-16

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/volatiletech/sqlboiler/v4/importers"
)

const sqlBoilerVersion = "4.8.2"
const sqlBoilerVersion = "4.8.3"

var (
flagConfigFile string
Expand Down
2 changes: 1 addition & 1 deletion templates/main/singleton/boil_types.go.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ It only titlecases the EnumValue portion if it's snake-cased.
{{- if $isNamed -}}
{{ $enumName = titleCase $name}}
{{- else -}}
{{ $enumName = titleCase $table.Name $col.Name}}
{{ $enumName = printf "%s%s" (titleCase $table.Name) (titleCase $col.Name)}}
{{- end -}}

{{if $.AddEnumTypes}}
Expand Down

0 comments on commit 5dbdebc

Please sign in to comment.