class AddSlotToMeme < ActiveRecord::Migration[6.1]
  def change
    add_column :memes, :slot, :integer

    Meme.all.each do |meme|
      meme.update!(slot: rand(1..16))
    end

    change_column :memes, :slot, :integer, null: false
  end
end
