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: 20120527125200_database_translations.rb
    path of file: ./repos/mushroom-observer/db/migrate
    
    the code of the file until where you have to start completion: # encoding: utf-8

require "yaml"

class DatabaseTranslations < ActiveRecord::Migration
  def self.up
    begin
      drop_table :languages
      drop_table :translation_strings
      drop_table :translation_strings_versions
    rescue
    end

    create_table :languages, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: true do |t|
      t.string
    
    def create_translation_strings
      n = 0
      strings = []
      versions = []
      user_id = @users[@locale].id.to_s
      for tag in @tags
        id = @string_id += 1
        text = clean_string(@data[tag.to_s])
        strings << ["1", @language.id.to_s, tag.to_s, text, @now, user_id]
        versions << ["1", id.to_s, text, @now, user_id]
        if strings.length >= 100
          $stdout.write("#{(100.0 * n / @tags.length).round}%\r")
          finish_records(strings, versions)
          strings = []
          versions = []
        end