Skip to content

A platform for community discussion. Free, open, simple.

286 B
Raw Blame
# frozen_string_literal: true

class FixChatChannelSlugIndex < ActiveRecord::Migration[7.0]
  def up
    remove_index(:chat_channels, :slug)
    add_index :chat_channels, :slug, unique: true, where: "slug != ''"
  end

  def down
    raise ActiveRecord::IrreversibleMigration
  end
end