Skip to content
This repository was archived by the owner on Apr 26, 2019. It is now read-only.
This repository was archived by the owner on Apr 26, 2019. It is now read-only.

Allow updating the value of an enum column #10

@direction

Description

@direction

Something along the lines of

class Table
  ... 
  def change(old_value, new_value)
    @connection.execute "UPDATE #{@connection.quote_table_name @name}
    SET value = #{@connection.quote old_value} WHERE value = #{@connection.quote new_value}"
  end
end

in https://github.com/howaboutwe/enum_table/blob/master/lib/enum_table/schema_statements.rb#L66

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions