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: database.rb
    path of file: ./repos/discourse/script/import_scripts/mbox/support
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require "sqlite3"

module ImportScripts::Mbox
  class Database
    SCHEMA_VERSION = 2

    def initialize(directory, batch_size)
      @db = SQLite3::Database.new("#{directory}/in
    
    def initialize(directory, batch_size)
      @db = SQLite3::Database.new("#{directory}/index.db", results_as_hash: true)
      @batch_size = batch_size

      configure_database
      upgrade_schema_version
      create_table_for_categories
      create_table_for_imported_files
      create_table_for_emails
      create_table_for_replies
      create_table_for_users
    end