Sha256: 23857ca959a547145c966c2a39912153477573d3e623e6f3b376b4f7b69f6974

Contents?: true

Size: 603 Bytes

Versions: 1

Compression:

Stored size: 603 Bytes

Contents

class UpdateColumnCommentsForConditionProducts < ActiveRecord::Migration[7.1]
  def up
    if connection.supports_comments?
      change_table_comment(:friendly_condition_products, friendly_condition_products_table_comment)
      change_column_comment(:friendly_condition_products, :condition_id, condition_id_comment)
    end
  end

  private

  def friendly_condition_products_table_comment
    <<~COMMENT
      Join table between promotion conditions and products.
    COMMENT
  end

  def condition_id_comment
    <<~COMMENT
      Foreign key to the friendly_conditions table.
    COMMENT
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solidus_friendly_promotions-1.9.0 db/migrate/20240612115749_update_column_comments_for_condition_products.rb