You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: 20171222143311_create_thredded.thredded.rb
    path of file: ./repos/alonetone/db/migrate
    
    the code of the file until where you have to start completion: # This migration comes from thredded (originally 20160329231848)
# frozen_string_literal: true
# rubocop:disable Metrics/ClassLength
# rubocop:disable Metrics/MethodLength
class CreateThredded < ActiveRecord::Migration[5.1]
  def change
    unless table_exists?(:friendly_id_slugs)
      # The user might have
    
  def change
    unless table_exists?(:friendly_id_slugs)
      # The user might have installed FriendlyId separately already.
      create_table :friendly_id_slugs do |t|
        t.string :slug, limit: 191, null: false
        t.integer :sluggable_id, null: false
        t.string :sluggable_type, limit: 50
        t.string :scope, limit: 191
        t.datetime :created_at, null: false
        t.index [:slug, :sluggable_type, :scope],
                name: :index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope,
                unique: true
        t.index [:slug, :sluggable_type], name: :index_friendly_id_slugs_on_slug_and_sluggable_type
        t.index [:sluggable_id], name: :index_friendly_id_slugs_on_sluggable_id
        t.index [:sluggable_type], name: :index_friendly_id_slugs_on_sluggable_type
      end
    end