Skip to content

v0.2.4

Choose a tag to compare

@roonglit roonglit released this 16 Oct 13:46
· 17 commits to main since this release

A small release on top of v0.2.3: generator attributes now follow Rails's own string/text distinction, and a bare field name defaults to string.

Added: a bare field name defaults to string

bogie g model, g scaffold, and g migration now accept a field with no :type, exactly as rails g model name description does. bogie g model comment title body:text is the same as title:string body:text. Previously every attribute required an explicit :type, and a bare name like title was rejected with an error.

Fixed: string no longer collapses into text

string attributes now map to Postgres varchar (unlimited, since Rails leaves it with no :limit); text attributes are unchanged. Previously both mapped to the identical text column, erasing the distinction Rails itself makes between the two — the distinction this tool exists to preserve.

Affected: only attributes generated by v0.2.4 onward. Columns already created by g model/g migration/g scaffold on v0.2.3 and earlier keep whatever type their migration file already specifies; this does not rewrite existing migrations.

Not carried by app:update: this is a change to the generator's own attribute table (internal/generate/attrs.go), not to a file the tool templates into your app, so bogie app:update has nothing to merge for it.

Install / upgrade

go install github.com/bogie-go/bogie@latest    # v0.2.4

Full Changelog: v0.2.3...v0.2.4