All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Support for 7.0
- ActiveRecord added
enum_types
interface so monkeypatch has been removed. Note: output format has changed. create_enum
uses framework interface, replacing:as
kwarg with:enum_type
- Don't mutate
Gem::Version#canonical_segments
(@agrobbin)
- Argument bug that surfaced in Ruby 3.0
- Support for 6.1
rename_enum
command for changing the type namerename_enum_value
command for changing an enum label (PostgreSQL 10+ only)
- Refactored some code to eliminate deprecation warnings in 2.7 related to kwargs
- Don't include schema name in dumped enum types to be consistent with the way tables are dumped (@TylerRick)
- Dump enums declared in non-public schemas
- Fix missing
enum
method with usingchange_table
- Allow enum labels to contain spaces (@AndrewSpeed)
- Move the active_record load hook to a different place to ensure things run in the correct order
- Update Rails 6 support to 6.0-final
- Support for 4.1 and 4.2
- Moved module builder to top-level
PGEnum()
method
enum
method onTableDefinition
- Refactored init hook to be much more flexible
- Removed
ActiveRecord::PGEnum::Helper
in favor ofActiveRecord::PGEnum()
module builder
- Support for 5.0 and 5.1
- Change travis config to test against oldest supported version of ruby
- Fixed a bug in the
SchemaDumper
output
- Change API of
create_enum
to take two arguments instead, the name and an array of values
- Bump Ruby requirement to 2.2.2 (for Rails 5.2) until earlier framework versions are supported.
enum_types
are listed in alphabetical order
add_to_enum
for modifying existing typesActiveRecord::Migration::CommandRecorder
is patched to makecreate_enum
, anddrop_enum
reversible.
- Ruby 2.1 is defined as the earliest supported version (for kwargs)
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter#enum_types
returns a Hash instead of a nested Array