Skip to content

Cop idea: Prefer symbol keys over string keys in migrations #38

@ydakuka

Description

@ydakuka

Add a cop that enforces the use of symbol arguments instead of string arguments in migration DSL methods:

# bad
t.string 'uuid', limit: 36, null: false, index: { unique: true }
t.references 'language', type: :integer, foreign_key: true, null: false

# good
t.string :uuid, limit: 36, null: false, index: { unique: true }
t.references :language, type: :integer, foreign_key: true, null: false

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions