method

action_sql

action_sql(action, dependency)
private

No documentation available.

# File activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb, line 175
        def action_sql(action, dependency)
          case dependency
          when :nullify then "ON #{action} SET NULL"
          when :cascade  then "ON #{action} CASCADE"
          when :restrict then "ON #{action} RESTRICT"
          else
            raise ArgumentError, <<~MSG
              '#{dependency}' is not supported for :on_update or :on_delete.
              Supported values are: :nullify, :cascade, :restrict
            MSG
          end
        end
    end