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: 20171216120950_add_locale_to_user_created_resources.rb
    path of file: ./repos/annict/db/migrate
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class AddLocaleToUserCreatedResources < ActiveRecord::Migration[5.1]
  def change
    table
    
  def change
    table_names = %i[
      checkins
      comments
      db_comments
      forum_comments
      forum_posts
      items
      reviews
      tips
      userland_projects
      work_comments
      work_taggables
      work_tags
    ]

    table_names.each do |tn|
      add_column tn, :locale, :string, null: false, default: "other"
      add_index tn, :locale
    end
  end