instance method up

Ruby on Rails 3.0.12

Since v3.0.12 Last seen in v3.0.12

Signature

up()

No documentation comment.

Source
# File lib/generators/solid_cable/update/templates/db/migrate/create_compact_channel.rb, line 4
  def up
    change_column :solid_cable_messages, :channel, :binary, limit: 1024, null: false
    add_column :solid_cable_messages, :channel_hash, :integer, limit: 8, if_not_exists: true
    add_index :solid_cable_messages, :channel_hash, if_not_exists: true
    change_column :solid_cable_messages, :payload, :binary, limit: 536_870_912, null: false

    SolidCable::Message.find_each do |msg|
      msg.update(channel_hash: SolidCable::Message.channel_hash_for(msg.channel))
    end
  end

Defined in lib/generators/solid_cable/update/templates/db/migrate/create_compact_channel.rb line 4 · View on GitHub · Improve this page · Find usages on GitHub

Defined in CreateCompactChannel

Type at least 2 characters to search.

↑↓ navigate · open · esc close