Files
astuto/db/migrate/20240404153252_change_slug_post_unique_constraint.rb

7 lines
178 B
Ruby
Raw Permalink Normal View History

class ChangeSlugPostUniqueConstraint < ActiveRecord::Migration[6.1]
def change
remove_index :posts, :slug
add_index :posts, [:slug, :tenant_id], unique: true
end
end