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: 20220829100535_create_public_links.rb
    path of file: ./repos/zammad/db/migrate
    
    the code of the file until where you have to start completion: # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/

class CreatePublicLinks < A
    
  def change
    # return if it's a new setup
    return if !Setting.exists?(name: 'system_init_done')

    add_table
    add_index :public_links, [:link], unique: true
    add_foreign_key :public_links, :users, column: :created_by_id
    add_foreign_key :public_links, :users, column: :updated_by_id

    add_permission
  end