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: m20220101_000006_create_table.rs
    path of file: ./repos/kellnr/crates/db/migration/src
    
    the code of the file until where you have to start completion: use crate::m20220101_000006_create_table_entities::{crate_index, krate};
use common::index_metadata::IndexMetadata;
use hex::ToHex;
use sea_orm::{ActiveModelTrait, ColumnTrait, EntityTrait, QueryFilter, Set};
use sea_orm_migration::prelude::*;
use sha2::{Digest, Sha256};
use tracing::debug;

#[
    
    async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> {
        // Manual check if the column exists is needed, as Sqlite does not support
        // ALTER TABLE IF COLUMN EXISTS. Without the check, the migration would fail
        // on Sqlite with an "duplicate column" error.

        if manager.has_column("krate", "etag").await? {
            debug!("Column krate.etag already exists");
        } else {
            manager
                .alter_table(
                    Table::alter()
                        .table(CrateIden::Table)
                        .add_column_if_not_exists(
                            ColumnDef::new(CrateIden::ETag)
                                .string_len(64)
                                .not_null()
                                .default(""),
                        )
                        .to_owned(),
                )
                .await?;
            debug!("Added new column etag");
        }

        fill_new_column(manager.get_connection()).await
    }