Skip to content

Releases: Invoca/declare_schema

Release v4.0.3

Choose a tag to compare

@invoca-ruby-repos invoca-ruby-repos released this 01 Jul 19:56

Changed

  • Documented the field DSL macro and the underlying declare_field class method.

Release v4.0.2

Choose a tag to compare

@invoca-ruby-repos invoca-ruby-repos released this 29 May 18:43

Fixed

  • Fixed Rails 7.2 compatibility for the serialize: field option. Rails 7.2 changed
    serialize from a positional second argument to keyword-only (coder: / type:),
    causing an ArgumentError in any app using serialize: Array, serialize: Hash,
    serialize: JSON, or a custom coder. The fix branches on Rails version and uses
    the correct keyword API for Rails ≥ 7.2:
    • serialize: trueserialize(attr, coder: ::YAML)
    • serialize: Array / serialize: Hashserialize(attr, coder: ::YAML, type: ClassName)
    • serialize: JSONserialize(attr, coder: JSON)
    • serialize: MyCoder (custom coder) → serialize(attr, coder: MyCoder)
      Note: ::YAML is used explicitly rather than relying on default_column_serializer,
      which is nil by default in Rails 7.2 apps using load_defaults 7.2.

Release v4.0.1

Choose a tag to compare

@invoca-ruby-repos invoca-ruby-repos released this 07 May 16:03

Fixed

  • DeferredFieldSpec (the lazy stand-in introduced in 4.0.0 for belongs_to
    foreign-key field specs) now transparently delegates the FieldSpec read
    API (.options, .type, .limit, .null, etc.) to its memoized resolved
    spec. Application code that reads Model.field_specs[name].options at
    runtime would raise NoMethodError: undefined method 'options' for an instance of DeclareSchema::Model::DeferredFieldSpec.

Release v4.0.1.colin.1

Choose a tag to compare

@invoca-ruby-repos invoca-ruby-repos released this 05 May 22:41

Fixed

  • DeferredFieldSpec (the lazy stand-in introduced in 4.0.0 for belongs_to
    foreign-key field specs) now transparently delegates the FieldSpec read
    API (.options, .type, .limit, .null, etc.) to its memoized resolved
    spec. Application code that reads Model.field_specs[name].options at
    runtime would raise NoMethodError: undefined method 'options' for an instance of DeclareSchema::Model::DeferredFieldSpec.

Release v3.1.0.colin.3

Choose a tag to compare

@invoca-ruby-repos invoca-ruby-repos released this 04 May 20:15

Added

  • Add HABTM support for arbitrary primary key in the referenced table (rather than just :bigint).

Removed

  • Drop support for Rails 6.x. Minimum supported Rails is now 7.0.

Release v3.1.0.colin.2

Choose a tag to compare

@invoca-ruby-repos invoca-ruby-repos released this 03 May 15:05

Added

  • Add HABTM support for arbitrary primary key in the referenced table (rather than just :bigint).

Removed

  • Drop support for Rails 6.x. Minimum supported Rails is now 7.0.

Release v3.1.0.colin.1

Choose a tag to compare

@invoca-ruby-repos invoca-ruby-repos released this 19 Aug 15:17

Added

  • Add HABTM support for arbitrary primary key in the referenced table (rather than just :bigint).

Release v2.3.2

Choose a tag to compare

@invoca-ruby-repos invoca-ruby-repos released this 22 Feb 01:24
05593d8

Fixed

  • Removed require of activesupport/proxy_object which is removed in Rails 8.0

Release v2.3.1

Choose a tag to compare

@invoca-ruby-repos invoca-ruby-repos released this 11 Dec 00:05

Fixed

  • Fixed bug where a new model with belongs_to :owner, polymorphic: true would cause
    a "Mysql2::Error: Table '' doesn't exist:" exception when generating a migration.

Release v2.3.0

Choose a tag to compare

@invoca-ruby-repos invoca-ruby-repos released this 31 Oct 16:52

Updated

  • Updated the current_adapter method to use connection_db_config for Rails 6.1 and higher, while retaining connection_config for earlier versions