Skip to content

Migration generators inconsistently specify version #353

Description

@jeffhorn-nava

Problem

Two of three Strata migration generators hard-code ActiveRecord::Migration[7.2]. The third (task) already interrogates ActiveRecord::Migration.current_version. Strata consumers on a newer Rails version inherit the wrong specifier from the two outdated templates.

Surfaced in oscer#570 (audit_log template produced [7.2] against OSCER on Rails 8.0).

Current state

Generator Template Status
task lib/generators/strata/task/templates/create_strata_tasks.rb.tt ✅ uses current_version
determination lib/generators/strata/determination/templates/create_strata_determinations.rb.tt ❌ hard-codes [7.2]
audit_log lib/generators/strata/audit_log/templates/create_strata_audit_lines.rb.tt ❌ hard-codes [7.2]

Fix

Bring determination and audit_log into line with task: replace [7.2] with [<%= ActiveRecord::Migration.current_version %>].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions